OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/file_path.h" |
| 6 #include "base/file_util.h" |
| 7 #include "base/test/test_timeouts.h" |
| 8 #include "chrome/test/automation/tab_proxy.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "chrome/test/ui/ui_layout_test.h" |
| 11 #include "content/public/common/content_switches.h" |
| 12 #include "net/base/net_util.h" |
| 13 |
| 14 static const char* kLayoutTestFileNames[] = { |
| 15 // TODO(dgrogan): Put the other IDB layout tests here. |
| 16 "prefetch-bugfix-108071.html", |
| 17 }; |
| 18 |
| 19 class IndexedDBUILayoutTest : public UILayoutTest { |
| 20 protected: |
| 21 IndexedDBUILayoutTest() |
| 22 : UILayoutTest(), |
| 23 test_dir_(FilePath(). |
| 24 AppendASCII("storage").AppendASCII("indexeddb")) { |
| 25 } |
| 26 |
| 27 virtual ~IndexedDBUILayoutTest() { } |
| 28 |
| 29 void AddJSTestResources() { |
| 30 // Add other paths our tests require. |
| 31 FilePath js_dir = FilePath(). |
| 32 AppendASCII("fast").AppendASCII("js"); |
| 33 AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources")); |
| 34 } |
| 35 |
| 36 FilePath test_dir_; |
| 37 }; |
| 38 |
| 39 TEST_F(IndexedDBUILayoutTest, LayoutTests) { |
| 40 const int port = kNoHttpPort; |
| 41 InitializeForLayoutTest(test_dir_, FilePath(), port); |
| 42 AddJSTestResources(); |
| 43 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i) |
| 44 RunLayoutTest(kLayoutTestFileNames[i], port); |
| 45 } |
OLD | NEW |