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

Unified Diff: chrome/browser/in_process_webkit/dom_storage_uitest.cc

Issue 159720: Run the DOM Storage layout tests in the UI test framework since the test shel... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/in_process_webkit/dom_storage_uitest.cc
===================================================================
--- chrome/browser/in_process_webkit/dom_storage_uitest.cc (revision 0)
+++ chrome/browser/in_process_webkit/dom_storage_uitest.cc (revision 0)
@@ -0,0 +1,73 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/chrome_switches.h"
+#include "chrome/test/ui/ui_layout_test.h"
+
+// TODO(jorlow): Enable these tests when we remove them from the
+// test_exceptions.txt file.
+//static const char* kTopLevelFiles[] = {
+ //"window-attributes-exist.html"
+//};
+
+// TODO(jorlow): Enable these tests when we remove them from the
+// test_exceptions.txt file.
+static const char* kSubDirFiles[] = {
+ "clear.html",
+ "delete-removal.html",
+ "enumerate-storage.html",
+ "enumerate-with-length-and-key.html",
+ //"iframe-events.html",
+ //"index-get-and-set.html",
+ //"onstorage-attribute-markup.html",
+ //"onstorage-attribute-setattribute.html",
+ //"localstorage/onstorage-attribute-setwindow.html",
+ //"simple-events.html",
+ "simple-usage.html",
+ //"string-conversion.html",
+// "window-open.html"
+};
+
+class DOMStorageTest : public UILayoutTest {
+ protected:
+ DOMStorageTest()
+ : UILayoutTest(),
+ test_dir_(FilePath().AppendASCII("LayoutTests").
+ AppendASCII("storage").AppendASCII("domstorage"))
+ {
+ }
+
+ virtual ~DOMStorageTest() { }
+
+ virtual void SetUp() {
+ launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking);
+ launch_arguments_.AppendSwitch(switches::kEnableLocalStorage);
+ launch_arguments_.AppendSwitch(switches::kEnableSessionStorage);
+ UILayoutTest::SetUp();
+ }
+
+ FilePath test_dir_;
+};
+
+TEST_F(DOMStorageTest, DOMStorageLayoutTests) {
+ // TODO(jorlow): Enable these tests when we remove them from the
+ // test_exceptions.txt file.
+ //InitializeForLayoutTest(test_dir_, FilePath(), false);
+ //for (size_t i=0; i<arraysize(kTopLevelFiles); ++i)
+ // RunLayoutTest(kTopLevelFiles[i], false, true);
+}
+
+TEST_F(DOMStorageTest, LocalStorageLayoutTests) {
+ InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("localstorage"),
+ false);
+ for (size_t i=0; i<arraysize(kSubDirFiles); ++i)
+ RunLayoutTest(kSubDirFiles[i], false);
+}
+
+TEST_F(DOMStorageTest, SessionStorageLayoutTests) {
+ InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"),
+ false);
+ for (size_t i=0; i<arraysize(kSubDirFiles); ++i)
+ RunLayoutTest(kSubDirFiles[i], false);
+}
Property changes on: chrome\browser\in_process_webkit\dom_storage_uitest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698