| OLD | NEW |
| 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 "chrome/common/chrome_switches.h" | 5 #include "chrome/common/chrome_switches.h" |
| 6 #include "chrome/test/automation/tab_proxy.h" | 6 #include "chrome/test/automation/tab_proxy.h" |
| 7 #include "chrome/test/ui/ui_layout_test.h" | 7 #include "chrome/test/ui/ui_layout_test.h" |
| 8 | 8 |
| 9 // TODO(jorlow): Enable all of these tests, eventually... | 9 // TODO(jorlow): Enable all of these tests, eventually... |
| 10 static const char* kEventsFiles[] = { | 10 static const char* kEventsFiles[] = { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 DOMStorageTest() | 52 DOMStorageTest() |
| 53 : UILayoutTest(), | 53 : UILayoutTest(), |
| 54 test_dir_(FilePath().AppendASCII("LayoutTests"). | 54 test_dir_(FilePath().AppendASCII("LayoutTests"). |
| 55 AppendASCII("storage").AppendASCII("domstorage")) { | 55 AppendASCII("storage").AppendASCII("domstorage")) { |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual ~DOMStorageTest() { } | 58 virtual ~DOMStorageTest() { } |
| 59 | 59 |
| 60 virtual void SetUp() { | 60 virtual void SetUp() { |
| 61 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking); | 61 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking); |
| 62 launch_arguments_.AppendSwitch(switches::kEnableLocalStorage); | |
| 63 launch_arguments_.AppendSwitch(switches::kEnableSessionStorage); | 62 launch_arguments_.AppendSwitch(switches::kEnableSessionStorage); |
| 64 UILayoutTest::SetUp(); | 63 UILayoutTest::SetUp(); |
| 65 } | 64 } |
| 66 | 65 |
| 67 // We require fast/js/resources and storage/domstorage/script-tests for most | 66 // We require fast/js/resources and storage/domstorage/script-tests for most |
| 68 // of the DOM Storage layout tests. Add those to the list to be copied. | 67 // of the DOM Storage layout tests. Add those to the list to be copied. |
| 69 void AddResources() { | 68 void AddResources() { |
| 70 // Add other paths our tests require. | 69 // Add other paths our tests require. |
| 71 FilePath js_dir = FilePath().AppendASCII("LayoutTests"). | 70 FilePath js_dir = FilePath().AppendASCII("LayoutTests"). |
| 72 AppendASCII("fast").AppendASCII("js"); | 71 AppendASCII("fast").AppendASCII("js"); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 119 } |
| 121 | 120 |
| 122 TEST_F(DOMStorageTest, SessionStorageLayoutTests) { | 121 TEST_F(DOMStorageTest, SessionStorageLayoutTests) { |
| 123 InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"), | 122 InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"), |
| 124 false); | 123 false); |
| 125 AddResources(); | 124 AddResources(); |
| 126 RunTests(kNoEventsFiles); | 125 RunTests(kNoEventsFiles); |
| 127 //RunTests(kEventsFiles); | 126 //RunTests(kEventsFiles); |
| 128 RunTests(kSessionStorageFiles); | 127 RunTests(kSessionStorageFiles); |
| 129 } | 128 } |
| OLD | NEW |