diff options
| author | loislo@chromium.org <loislo@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2011-12-23 15:35:12 +0000 |
|---|---|---|
| committer | loislo@chromium.org <loislo@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2011-12-23 15:35:12 +0000 |
| commit | b4a33d525c90ac78168466c0a9209f10dc2e8fbd (patch) | |
| tree | c9b33fecf7fef490fd547a48b82e8c5a97d8c79c /third_party/WebKit/LayoutTests/fast/filesystem/script-tests | |
| parent | ba786573086dd578fe4f8dee08aadbeda8f53e51 (diff) | |
| download | chromium_src-b4a33d525c90ac78168466c0a9209f10dc2e8fbd.zip chromium_src-b4a33d525c90ac78168466c0a9209f10dc2e8fbd.tar.gz chromium_src-b4a33d525c90ac78168466c0a9209f10dc2e8fbd.tar.bz2 | |
Unreviewed, rolling out r103624.
http://trac.webkit.org/changeset/103624
https://bugs.webkit.org/show_bug.cgi?id=68916
Broke Snow Leopard builders
Source/WebCore:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSDirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* fileapi/WebKitFlags.idl: Added.
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
LayoutTests:
* fast/filesystem/flags-passing-expected.txt:
* fast/filesystem/script-tests/flags-passing.js:
(runNextTest):
(runObjectTest):
(runObjectTestWithExclusive):
git-svn-id: svn://svn.chromium.org/blink/trunk@103625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/filesystem/script-tests')
| -rw-r--r-- | third_party/WebKit/LayoutTests/fast/filesystem/script-tests/flags-passing.js | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/flags-passing.js b/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/flags-passing.js index 2e5fbee..d2d06b2 100644 --- a/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/flags-passing.js +++ b/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/flags-passing.js @@ -1,4 +1,4 @@ -description("Passing Flags parameter tests. This test checks if passing Flags parameters to DirectoryEntry.getFile does not crash and works as expected."); +description("Passing Flags parameter tests. This test checks if passing Flags parameters (in Object format or in JSON format) to DirectoryEntry.getFile does not crash and works as expected."); var testFileName = '/non_existent_file'; var fileSystem = null; @@ -9,18 +9,18 @@ var unexpected = function(e) { unexpectedCallbacksCount++; }; var testsList = [ 'runObjectTest', + 'runObjectTestWithExclusive', 'cleanupAndRunNext', 'runJSONTest', 'runJSONTestWithExclusive', - 'runNullTest', - 'runNonObjectTest' + 'runNullTest' ]; var testCounter = 0; function runNextTest(v) { if (testCounter == testsList.length) { debug("Finished running tests."); - shouldBe('expectedCallbacksCount', '1'); + shouldBe('expectedCallbacksCount', '3'); shouldBe('unexpectedCallbacksCount', '0'); finishJSTest(); } else @@ -40,18 +40,29 @@ function runNullTest(v) { fileSystem.root.getFile(testFileName, null, runNextTest, errorCallback); } -function runNonObjectTest(v) { - debug("* Passing a number as a WebKitFlags parameter."); +function runObjectTest(v) { + debug("* Passing a WebKitFlags object."); + var flags = new WebKitFlags(); + flags.create = false; - // This should be ok and we treat it as {false, false} Flags. - fileSystem.root.getFile(testFileName, 7, runNextTest, errorCallback); + fileSystem.root.getFile(testFileName, flags, unexpected, expected); + + debug("* Recycling the same WebKitFlags object."); + + fileSystem.root.getFile(testFileName, flags, unexpected, expected); + + flags.create = true; + fileSystem.root.getFile(testFileName, flags, runNextTest, errorCallback); } -function runObjectTest(v) { - // WebKitFlags no longer has a visible constructor. - if (window.WebKitFlags) - throw "There should be no constructor for WebKitFlags!"; - runNextTest(); +function runObjectTestWithExclusive(v) { + debug("* Passing a WebKitFlags object (with exclusive=true)."); + var flags = new WebKitFlags; + flags.create = true; + flags.exclusive = true; + + // This should fail. + fileSystem.root.getFile(testFileName, flags, errorCallback, runNextTest); } function runJSONTest(v) { |
