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

Side by Side Diff: content/browser/dom_storage/dom_storage_browsertest.cc

Issue 2820343003: Disable several flaky mojo localstorage tests on Mac. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
8 #include "content/browser/dom_storage/local_storage_context_mojo.h" 8 #include "content/browser/dom_storage/local_storage_context_mojo.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/common/dom_storage/dom_storage_types.h" 10 #include "content/common/dom_storage/dom_storage_types.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // http://crbug.com/654704 PRE_ tests aren't supported on Android. 91 // http://crbug.com/654704 PRE_ tests aren't supported on Android.
92 #if defined(OS_ANDROID) 92 #if defined(OS_ANDROID)
93 #define MAYBE_DataPersists DISABLED_DataPersists 93 #define MAYBE_DataPersists DISABLED_DataPersists
94 #else 94 #else
95 #define MAYBE_DataPersists DataPersists 95 #define MAYBE_DataPersists DataPersists
96 #endif 96 #endif
97 IN_PROC_BROWSER_TEST_F(DOMStorageBrowserTest, MAYBE_DataPersists) { 97 IN_PROC_BROWSER_TEST_F(DOMStorageBrowserTest, MAYBE_DataPersists) {
98 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito); 98 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
99 } 99 }
100 100
101 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, SanityCheck) { 101 // http://crbug.com/712872 All the mojo tests are flaky on Mac.
102 #if defined(OS_MACOSX)
103 #define MAYBE_SanityCheck DISABLED_SanityCheck
104 #else
105 #define MAYBE_SanityCheck SanityCheck
106 #endif
107 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_SanityCheck) {
102 SimpleTest(GetTestUrl("dom_storage", "sanity_check.html"), kNotIncognito); 108 SimpleTest(GetTestUrl("dom_storage", "sanity_check.html"), kNotIncognito);
103 } 109 }
104 110
105 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, SanityCheckIncognito) { 111 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, SanityCheckIncognito) {
106 SimpleTest(GetTestUrl("dom_storage", "sanity_check.html"), kIncognito); 112 SimpleTest(GetTestUrl("dom_storage", "sanity_check.html"), kIncognito);
107 } 113 }
108 114
109 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, PRE_DataPersists) { 115 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, PRE_DataPersists) {
110 EnsureConnected(); 116 EnsureConnected();
111 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito); 117 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito);
112 Flush(); 118 Flush();
113 } 119 }
114 120
121 // http://crbug.com/712872 All the mojo tests are flaky on Mac.
122 #if defined(OS_MACOSX)
123 #undef MAYBE_DataPersists
124 #define MAYBE_DataPersists DISABLED_DataPersists
125 #endif
115 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_DataPersists) { 126 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_DataPersists) {
116 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito); 127 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
117 } 128 }
118 129
119 class DOMStorageMigrationBrowserTest : public DOMStorageBrowserTest { 130 class DOMStorageMigrationBrowserTest : public DOMStorageBrowserTest {
120 public: 131 public:
121 void SetUpCommandLine(base::CommandLine* command_line) override { 132 void SetUpCommandLine(base::CommandLine* command_line) override {
122 ContentBrowserTest::SetUpCommandLine(command_line); 133 ContentBrowserTest::SetUpCommandLine(command_line);
123 // Only enable mojo local storage if this is not a PRE_ test. 134 // Only enable mojo local storage if this is not a PRE_ test.
124 const testing::TestInfo* test = 135 const testing::TestInfo* test =
125 testing::UnitTest::GetInstance()->current_test_info(); 136 testing::UnitTest::GetInstance()->current_test_info();
126 if (!base::StartsWith(test->name(), "PRE_", base::CompareCase::SENSITIVE)) 137 if (!base::StartsWith(test->name(), "PRE_", base::CompareCase::SENSITIVE))
127 command_line->AppendSwitch(switches::kMojoLocalStorage); 138 command_line->AppendSwitch(switches::kMojoLocalStorage);
128 } 139 }
129 }; 140 };
130 141
131 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, PRE_DataMigrates) { 142 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, PRE_DataMigrates) {
132 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito); 143 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito);
133 } 144 }
134 145
135 // http://crbug.com/654704 PRE_ tests aren't supported on Android. 146 // http://crbug.com/654704 PRE_ tests aren't supported on Android.
136 #if defined(OS_ANDROID) 147 #if defined(OS_ANDROID)
137 #define MAYBE_DataMigrates DISABLED_DataMigrates 148 #define MAYBE_DataMigrates DISABLED_DataMigrates
149 #elif defined(OS_MACOSX)
150 // http://crbug.com/712872 All the mojo tests are flaky on Mac.
151 #define MAYBE_DataMigrates DISABLED_DataMigrates
138 #else 152 #else
139 #define MAYBE_DataMigrates DataMigrates 153 #define MAYBE_DataMigrates DataMigrates
140 #endif 154 #endif
141 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, MAYBE_DataMigrates) { 155 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, MAYBE_DataMigrates) {
142 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito); 156 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
143 } 157 }
144 158
145 } // namespace content 159 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698