Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: chrome/browser/in_process_webkit/dom_storage_uitest.cc

Issue 1547009: Change ui_tests to pull the directories it needs from the upstream webkit (Closed)
Patch Set: fix path for web socket tests Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_path.h" 5 #include "base/file_path.h"
6 #include "chrome/common/chrome_switches.h" 6 #include "chrome/common/chrome_switches.h"
7 #include "chrome/test/automation/tab_proxy.h" 7 #include "chrome/test/automation/tab_proxy.h"
8 #include "chrome/test/ui/ui_layout_test.h" 8 #include "chrome/test/ui/ui_layout_test.h"
9 #include "chrome/test/ui_test_utils.h" 9 #include "chrome/test/ui_test_utils.h"
10 10
(...skipping 24 matching lines...) Expand all
35 "simple-usage.html", 35 "simple-usage.html",
36 "string-conversion.html", 36 "string-conversion.html",
37 // "window-open.html", // TODO(jorlow): Fix 37 // "window-open.html", // TODO(jorlow): Fix
38 NULL 38 NULL
39 }; 39 };
40 40
41 class DOMStorageTest : public UILayoutTest { 41 class DOMStorageTest : public UILayoutTest {
42 protected: 42 protected:
43 DOMStorageTest() 43 DOMStorageTest()
44 : UILayoutTest(), 44 : UILayoutTest(),
45 test_dir_(FilePath().AppendASCII("LayoutTests"). 45 test_dir_(FilePath().
46 AppendASCII("storage").AppendASCII("domstorage")) { 46 AppendASCII("storage").AppendASCII("domstorage")) {
47 } 47 }
48 48
49 virtual ~DOMStorageTest() { } 49 virtual ~DOMStorageTest() { }
50 50
51 virtual void SetUp() { 51 virtual void SetUp() {
52 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking); 52 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking);
53 UILayoutTest::SetUp(); 53 UILayoutTest::SetUp();
54 } 54 }
55 55
56 // We require fast/js/resources for most of the DOM Storage layout tests. 56 // We require fast/js/resources for most of the DOM Storage layout tests.
57 // Add those to the list to be copied. 57 // Add those to the list to be copied.
58 void AddJSTestResources() { 58 void AddJSTestResources() {
59 // Add other paths our tests require. 59 // Add other paths our tests require.
60 FilePath js_dir = FilePath().AppendASCII("LayoutTests"). 60 FilePath js_dir = FilePath().
61 AppendASCII("fast").AppendASCII("js"); 61 AppendASCII("fast").AppendASCII("js");
62 AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources")); 62 AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources"));
63 } 63 }
64 64
65 // This is somewhat of a hack because we're running a real browser that 65 // This is somewhat of a hack because we're running a real browser that
66 // actually persists the LocalStorage state vs. DRT and TestShell which don't. 66 // actually persists the LocalStorage state vs. DRT and TestShell which don't.
67 // The correct fix is to fix the LayoutTests, but similar patches have been 67 // The correct fix is to fix the LayoutTests, but similar patches have been
68 // rejected in the past. 68 // rejected in the past.
69 void ClearDOMStorage() { 69 void ClearDOMStorage() {
70 scoped_refptr<TabProxy> tab(GetActiveTab()); 70 scoped_refptr<TabProxy> tab(GetActiveTab());
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 TEST_F(DOMStorageTest, SessionStorageLayoutTests) { 122 TEST_F(DOMStorageTest, SessionStorageLayoutTests) {
123 InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"), 123 InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"),
124 kNoHttpPort); 124 kNoHttpPort);
125 AddJSTestResources(); 125 AddJSTestResources();
126 AddResourceForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"). 126 AddResourceForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage").
127 AppendASCII("resources")); 127 AppendASCII("resources"));
128 RunTests(kStorageFiles); 128 RunTests(kStorageFiles);
129 } 129 }
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698