WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Layout test
bug-135882-20150902173626.patch (text/plain), 6.00 KB, created by
Daniel Bates
on 2015-09-02 17:36:26 PDT
(
hide
)
Description:
Layout test
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2015-09-02 17:36:26 PDT
Size:
6.00 KB
patch
obsolete
>Subversion Revision: 189260 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 154ad87d031a2cac8266e042cdfdc29655ef311c..9da4d7cdf423d0803d43d36f9fde9ae1a043f672 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2015-09-02 Daniel Bates <dabates@apple.com> >+ >+ Write a test to ensure we don't regress processing of tasks when page defers loading >+ https://bugs.webkit.org/show_bug.cgi?id=135882 >+ <rdar://problem/22550497> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Towards adding a test for <https://bugs.webkit.org/show_bug.cgi?id=135688>, add a window.internals >+ function, setPageDefersLoading, to enable and disable whether the page defers loading. >+ >+ Test: storage/websql/success-callback-when-page-defers-loading.html >+ >+ * testing/Internals.cpp: >+ (WebCore::Internals::resetToConsistentState): Reset defers loading for the page to false. >+ (WebCore::Internals::setPageDefersLoading): Added. >+ * testing/Internals.h: >+ * testing/Internals.idl: Added IDL declaration setPageDefersLoading. >+ > 2015-09-02 Chris Fleizach <cfleizach@apple.com> > > AX: WebKit does not expose max/min value of <progress> element >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 5dd446a0a039a948204f5068ebf218f7b5d985f0..2c2812b2c4f29a25714ac58448e3e6bab81cc6ac 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -305,6 +305,8 @@ void Internals::resetToConsistentState(Page* page) > > page->setPageScaleFactor(1, IntPoint(0, 0)); > page->setPagination(Pagination()); >+ >+ page->setDefersLoading(false); > > page->mainFrame().setTextZoomFactor(1.0f); > >@@ -2931,6 +2933,15 @@ bool Internals::isPagePlayingAudio() > return !!(document->page()->mediaState() & MediaProducer::IsPlayingAudio); > } > >+void Internals::setPageDefersLoading(bool defersLoading) >+{ >+ Document* document = contextDocument(); >+ if (!document) >+ return; >+ if (Page* page = document->page()) >+ page->setDefersLoading(defersLoading); >+} >+ > RefPtr<File> Internals::createFile(const String& path) > { > Document* document = contextDocument(); >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 3339466abe369b8e5249a28c67de513233cd1c6f..605806a8b9acea1c6ffc4d8122d7213257b860a8 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -417,6 +417,8 @@ public: > void setPageMuted(bool); > bool isPagePlayingAudio(); > >+ void setPageDefersLoading(bool); >+ > RefPtr<File> createFile(const String&); > void queueMicroTask(int); > bool testPreloaderSettingViewport(); >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index 62d9d4e19b63bcb74a2434a6ff0eee698f8d4bdd..632b89c3f23b83a81e9e864db2cc9ad3cd987eda 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -387,7 +387,9 @@ enum MediaControlEvent { > > void setPageMuted(boolean muted); > boolean isPagePlayingAudio(); >- >+ >+ void setPageDefersLoading(boolean defersLoading); >+ > File createFile(DOMString url); > void queueMicroTask(long testNumber); > boolean testPreloaderSettingViewport(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e6dcabfbd7eb08f7ea49a30a63c009477be6e78d..19093ba57154ce61cde4f6740c06cc38ba204a01 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2015-09-02 Daniel Bates <dabates@apple.com> >+ >+ Write a test to ensure we don't regress processing of tasks when page defers loading >+ https://bugs.webkit.org/show_bug.cgi?id=135882 >+ <rdar://problem/22550497> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a test to ensure we do not regress <https://bugs.webkit.org/show_bug.cgi?id=135688>. >+ >+ * storage/websql/success-callback-when-page-defers-loading-expected.txt: Added. >+ * storage/websql/success-callback-when-page-defers-loading.html: Added. >+ > 2015-09-02 Zalan Bujtas <zalan@apple.com> > > r189233 accidentally removed some unrelated expected results. >diff --git a/LayoutTests/storage/websql/success-callback-when-page-defers-loading-expected.txt b/LayoutTests/storage/websql/success-callback-when-page-defers-loading-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..216fdec987207c2fbeb0cc3dd776e749b53ace4a >--- /dev/null >+++ b/LayoutTests/storage/websql/success-callback-when-page-defers-loading-expected.txt >@@ -0,0 +1,10 @@ >+This tests that a SQL success callback completes when the page defers loading. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS Callback invoked. >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/storage/websql/success-callback-when-page-defers-loading.html b/LayoutTests/storage/websql/success-callback-when-page-defers-loading.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c0e48144014ecc3fe1d41bde19eb9a492288d684 >--- /dev/null >+++ b/LayoutTests/storage/websql/success-callback-when-page-defers-loading.html >@@ -0,0 +1,30 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../resources/js-test-pre.js"></script> >+<script> >+window.jsTestIsAsync = true; >+ >+function runTest() >+{ >+ if (!window.testRunner || !window.internals) { >+ testFailed("You must run this test in the test tool."); >+ finishJSTest(); >+ return; >+ } >+ testRunner.clearAllDatabases(); >+ internals.setPageDefersLoading(true); >+ >+ var database = openDatabase("DatabaseTest", "1.0", "Test", 1024 /* bytes */); >+ database.transaction(new Function(), new Function(), function () { testPassed("Callback invoked."); finishJSTest(); }); >+} >+</script> >+</head> >+<body> >+<script> >+description("This tests that a SQL success callback completes when the page defers loading."); >+runTest(); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 135882
: 260457