summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 17:46:07 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 17:46:07 +0000
commit5039b7a3c5ba113c73ad0aca238c164c67a8805a (patch)
tree6ca9757e7a454a60f258a0b2f55814096307e2e9 /webkit
parent8e7ca37ada1ac495ab24df9ae2cd762a33397826 (diff)
downloadchromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.zip
chromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.tar.gz
chromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.tar.bz2
Support running tests under LayoutTests/http/tests/local as local file, in order to mimic what run-webkit-tests does.
Search "http/tests/local/" in http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/run-webkit-tests for what it does. This is needed by http/tests/local/resources/send-dragged-file.js. Turn on file URL universal access in the test_shell. Delete rebaseline results of those layout tests that pass due to this change. Also add a UI test to make sure it is not on for the browser. BUG=9275,12882 TEST=none Review URL: http://codereview.chromium.org/201048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.pngbin11333 -> 0 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.txt22
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/cleared-by-relayout-expected.txt8
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/inactive-selection-expected.txt8
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt7
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt7
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/leaks/002-expected.txt7
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-html-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/cleared-by-relayout-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/inactive-selection-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt5
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/leaks/002-expected.txt4
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-html-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt6
-rw-r--r--webkit/glue/webpreferences.cc8
-rw-r--r--webkit/glue/webpreferences.h5
-rw-r--r--webkit/tools/layout_tests/layout_package/path_utils.py9
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt27
-rw-r--r--webkit/tools/test_shell/test_shell.cc5
24 files changed, 29 insertions, 148 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.checksum b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.checksum
deleted file mode 100644
index c33a4a3..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.checksum
+++ /dev/null
@@ -1 +0,0 @@
-c29df3a4d4f9a0eaa650343d4ab0bee8 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.png b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.png
deleted file mode 100644
index 660304f..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.png
+++ /dev/null
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.txt
deleted file mode 100644
index 3faa363..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/4960137-expected.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <body contenteditable='true'>hello world</div> from frame with URL 4960137.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 5: Uncaught TypeError: Cannot read property 'body' of undefined
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x18
- RenderText {#text} at (0,0) size 659x18
- text run at (0,0) width 659: "This tests for an ASSERTion failure when setting the main frame's selection inside a node in a subframe."
- RenderBlock (anonymous) at (0,34) size 784x154
- RenderPartObject {IFRAME} at (0,0) size 304x154 [border: (2px inset #000000)]
- layer at (0,0) size 300x150
- RenderView at (0,0) size 300x150
- layer at (0,0) size 300x150
- RenderBlock {HTML} at (0,0) size 300x150
- RenderBody {BODY} at (8,8) size 284x134
- RenderText {#text} at (0,0) size 72x18
- text run at (0,0) width 72: "hello world"
- RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,0) size 0x0
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/cleared-by-relayout-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/cleared-by-relayout-expected.txt
deleted file mode 100644
index e294f49..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/cleared-by-relayout-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<body contenteditable> from frame with URL cleared-by-relayout.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<body contenteditable> from frame with URL cleared-by-relayout.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 16: Uncaught TypeError: Object [object global] has no method 'getSelection'
-Test for http://bugs.webkit.org/show_bug.cgi?id=15942 REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange()).
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/inactive-selection-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/inactive-selection-expected.txt
deleted file mode 100644
index e8d0538..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/editing/selection/inactive-selection-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <div id='input' contenteditable='true'>should be an inactive selection</div> from frame with URL inactive-selection.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 15: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-This test verifies that an editable element in one frame retains an inactive selection after you've made a selection in another frame.
-
-
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt
deleted file mode 100644
index c401f9b..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <body style="padding: 9px; margin: 10px; outline: thin solid blue;"> <div id="target" style="padding: 6px; margin: 8px; outline: thin solid green;"></div> </body> from frame with URL offsetLeft-offsetTop-body-quirk.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 13: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-
-
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt
deleted file mode 100644
index 7532aff..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <html id="target"></html> from frame with URL offsetLeft-offsetTop-html.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 13: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt
deleted file mode 100644
index e439dcd..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,FAILURE from frame with URL document-open-return-value.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 11: Uncaught TypeError: Cannot call method 'open' of undefined
-Test for bug 14968: document.open() erroneously returns void instead of the new Document.
-
-FAILURE
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/leaks/002-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/leaks/002-expected.txt
deleted file mode 100644
index 429eb3f..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/leaks/002-expected.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<input type='file' id='input'></input> from frame with URL 002.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 17: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-This test exercises RenderBlock::bidiReorderCharacters in a specific way to test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no particular meaning.
-
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-html-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-html-expected.txt
deleted file mode 100644
index 3afae8e..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-html-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html;charset=utf-8,<body>%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0</body> from frame with URL data-url-encoding-html.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 10: Uncaught TypeError: Cannot read property 'body' of undefined
-Test that non-ASCII data: URLs are handled correctly.
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt
deleted file mode 100644
index 29aa263..0000000
--- a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:image/svg+xml;charset=utf-8,<svg xmlns=%22http://www.w3.org/2000/svg%22 test='%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0'></svg> from frame with URL data-url-encoding-svg.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 8: Uncaught TypeError: Cannot read property 'documentElement' of undefined
-Test that non-ASCII data: URLs are handled correctly.
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/cleared-by-relayout-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/cleared-by-relayout-expected.txt
deleted file mode 100644
index 2124813..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/cleared-by-relayout-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<body contenteditable> from frame with URL cleared-by-relayout.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<body contenteditable> from frame with URL cleared-by-relayout.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 16: Uncaught TypeError: Object [object global] has no method 'getSelection'
-Test for http://bugs.webkit.org/show_bug.cgi?id=15942 REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange()).
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/inactive-selection-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/inactive-selection-expected.txt
deleted file mode 100644
index 83ded32..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/selection/inactive-selection-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <div id='input' contenteditable='true'>should be an inactive selection</div> from frame with URL inactive-selection.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 15: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-This test verifies that an editable element in one frame retains an inactive selection after you've made a selection in another frame.
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt
deleted file mode 100644
index e229a0d..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <body style="padding: 9px; margin: 10px; outline: thin solid blue;"> <div id="target" style="padding: 6px; margin: 8px; outline: thin solid green;"></div> </body> from frame with URL offsetLeft-offsetTop-body-quirk.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 13: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt
deleted file mode 100644
index 5dad070..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/Element/offsetLeft-offsetTop-html-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html, <html id="target"></html> from frame with URL offsetLeft-offsetTop-html.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 13: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt
deleted file mode 100644
index b792966..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/HTMLDocument/document-open-return-value-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,FAILURE from frame with URL document-open-return-value.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 11: Uncaught TypeError: Cannot call method 'open' of undefined
-Test for bug 14968: document.open() erroneously returns void instead of the new Document.
-
-FAILURE
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/leaks/002-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/leaks/002-expected.txt
deleted file mode 100644
index d80a2dc..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/leaks/002-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html,<input type='file' id='input'></input> from frame with URL 002.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 17: Uncaught TypeError: Cannot call method 'getElementById' of undefined
-This test exercises RenderBlock::bidiReorderCharacters in a specific way to test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no particular meaning.
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-html-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-html-expected.txt
deleted file mode 100644
index 3afae8e..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-html-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:text/html;charset=utf-8,<body>%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0</body> from frame with URL data-url-encoding-html.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 10: Uncaught TypeError: Cannot read property 'body' of undefined
-Test that non-ASCII data: URLs are handled correctly.
-
-
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt
deleted file mode 100644
index 29aa263..0000000
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/loader/data-url-encoding-svg-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL data:image/svg+xml;charset=utf-8,<svg xmlns=%22http://www.w3.org/2000/svg%22 test='%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0'></svg> from frame with URL data-url-encoding-svg.html. Domains, protocols and ports must match.
-
-CONSOLE MESSAGE: line 8: Uncaught TypeError: Cannot read property 'documentElement' of undefined
-Test that non-ASCII data: URLs are handled correctly.
-
-
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index 9b822fa..6c872d6 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -64,9 +64,11 @@ void WebPreferences::Apply(WebView* web_view) const {
// Turn this on to cause WebCore to paint the resize corner for us.
settings->setShouldPaintCustomScrollbars(true);
- // Mitigate attacks from local HTML files by not granting file:// URLs
- // universal access.
- settings->setAllowUniversalAccessFromFileURLs(false);
+ // By default, allow_universal_access_from_file_urls is set to false and thus
+ // we mitigate attacks from local HTML files by not granting file:// URLs
+ // universal access. Only test shell will enable this.
+ settings->setAllowUniversalAccessFromFileURLs(
+ allow_universal_access_from_file_urls);
// We prevent WebKit from checking if it needs to add a "text direction"
// submenu to a context menu. it is not only because we don't need the result
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 8c9a649..e6fbb49 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -54,6 +54,8 @@ struct WebPreferences {
bool user_style_sheet_enabled;
GURL user_style_sheet_location;
+ bool allow_universal_access_from_file_urls;
+
// We try to keep the default values the same as the default values in
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.
@@ -89,7 +91,8 @@ struct WebPreferences {
databases_enabled(false),
session_storage_enabled(false),
application_cache_enabled(false),
- user_style_sheet_enabled(false) {
+ user_style_sheet_enabled(false),
+ allow_universal_access_from_file_urls(false) {
}
void Apply(WebView* web_view) const;
diff --git a/webkit/tools/layout_tests/layout_package/path_utils.py b/webkit/tools/layout_tests/layout_package/path_utils.py
index 756ff0a..46a21af 100644
--- a/webkit/tools/layout_tests/layout_package/path_utils.py
+++ b/webkit/tools/layout_tests/layout_package/path_utils.py
@@ -197,15 +197,18 @@ def FilenameToUri(full_path):
elif relative_path.find("/http/") >= 0:
port = 8081
- if port:
+ # Make LayoutTests/http/tests/local run as local files. This is to mimic the
+ # logic in run-webkit-tests.
+ # TODO(jianli): Consider extending this to "media/".
+ if port and not relative_path.startswith("local/"):
if relative_path.startswith("ssl/"):
port += 443
protocol = "https"
else:
protocol = "http"
return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
- else:
- return "file:///" + GetAbsolutePath(full_path)
+
+ return "file:///" + GetAbsolutePath(full_path)
def GetAbsolutePath(path):
"""Returns an absolute UNIX path."""
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index a60f239..bc1fee2 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -94,23 +94,11 @@ WONTFIX SKIP : LayoutTests/fast/wml = FAIL
// most likely these tests will always be JSC specific.
WONTFIX SKIP : LayoutTests/fast/profiler = FAIL TIMEOUT
-// These tests depend on a bogus assumption that file:// URLs have universal
-// access to other URLs. This isn't true for us.
-WONTFIX SKIP : LayoutTests/editing/selection/drag-in-iframe.html = TIMEOUT
-WONTFIX SKIP : LayoutTests/fast/dom/gc-6.html = TIMEOUT
-WONTFIX SKIP : LayoutTests/fast/dom/gc-7.html = TIMEOUT
-WONTFIX SKIP : LayoutTests/fast/frames/frame-set-same-location.html = TIMEOUT
-WONTFIX SKIP : LayoutTests/fast/frames/frame-set-same-src.html = TIMEOUT
-WONTFIX SKIP : LayoutTests/fast/frames/hover-timer-crash.html = TIMEOUT
-
// This test doesn't terminate because it contains exponential
// regexps. It is safe to disable because we run the same tests
// (sans the nonterminating ones) as part of the v8 tests.
WONTFIX SKIP : LayoutTests/fast/regex/test1.html = PASS
-// We disallow file:// urls from doing XHR to data:.
-WONTFIX BUG9275 : LayoutTests/fast/encoding/char-decoding.html = FAIL
-
// We use worker_uitests to run workers tests. Don't run them in test_shell.
WONTFIX SKIP : LayoutTests/fast/workers = PASS TIMEOUT FAIL
WONTFIX SKIP : LayoutTests/http/tests/workers = PASS TIMEOUT FAIL
@@ -1059,11 +1047,6 @@ BUG8696 LINUX WIN : LayoutTests/fast/backgrounds/svg-as-background-3.html = FAIL
// http://code.google.com/p/chromium/issues/detail?id=7465 for details.
BUG10311 WIN LINUX : LayoutTests/fast/canvas/pointInPath.html = FAIL
-// Following tests are failing because Chrome does not allow file url
-// to access non-file urls.
-// TODO(port): mac is passing these, does that mean something is wrong?
-BUG1026885 LINUX WIN : LayoutTests/editing/selection/4960137.html = FAIL
-
// These fail the pixel tests in debug mode because they have
// unpainted space (filled red in Debug but not in Release).
// https://bugs.webkit.org/show_bug.cgi?id=8423
@@ -1989,7 +1972,6 @@ BUG12881 WIN LINUX : LayoutTests/fast/borders/border-radius-split-inline.html =
// WebKit 44202:44252 introduced new failures (old tests)
BUG12882 WIN : LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html = FAIL
BUG12882 WIN : LayoutTests/fast/box-shadow/basic-shadows.html = FAIL
-BUG12882 : LayoutTests/fast/dom/Window/open-existing-pop-up-blocking.html = TIMEOUT
// WebKit 44286:44342
BUG13174 WIN DEBUG : LayoutTests/transitions/shorthand-border-transitions.html = PASS FAIL
@@ -2351,3 +2333,12 @@ BUG21501 LINUX DEBUG : LayoutTests/svg/custom/linking-a-03-b-preserveAspectRatio
// New test added by https://trac.webkit.org/changeset/48260.
// Marked as SKIP because it fails to find the test expectations (dies early).
BUG21522 SKIP : LayoutTests/http/tests/local/send-dragged-file.html = FAIL
+
+// Need to rebaseline after we enable file URL universal access in test shell.
+BUG1026885 LINUX WIN : LayoutTests/editing/selection/4960137.html = FAIL
+BUG_JIANLI : LayoutTests/fast/dom/wrapper-classes.html = FAIL
+BUG_JIANLI : LayoutTests/fast/frames/frame-src-attribute.html = FAIL
+BUG_JIANLI : LayoutTests/editing/selection/drag-in-iframe.html = FAIL
+
+// Need investigation after we enable file URL universal access in test shell.
+BUG_JIANLI WIN : LayoutTests/fast/events/dispatchEvent-crash.html = CRASH
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index cbffa96..682b25b 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -423,6 +423,11 @@ void TestShell::ResetWebPreferences() {
web_prefs_->local_storage_enabled = true;
web_prefs_->session_storage_enabled = true;
web_prefs_->application_cache_enabled = false;
+
+ // Allow those layout tests running as local files, i.e. under
+ // LayoutTests/http/tests/local, to access http server.
+ if (layout_test_mode_)
+ web_prefs_->allow_universal_access_from_file_urls = true;
}
}