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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_test.cc

Issue 1908213003: Disable ExtensionTabsTest.GetWindow on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 <limits.h> 5 #include <limits.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 int GetWindowId(base::DictionaryValue* window) { 94 int GetWindowId(base::DictionaryValue* window) {
95 int id = kUndefinedId; 95 int id = kUndefinedId;
96 if (window) 96 if (window)
97 window->GetInteger(keys::kIdKey, &id); 97 window->GetInteger(keys::kIdKey, &id);
98 return id; 98 return id;
99 } 99 }
100 100
101 } // namespace 101 } // namespace
102 102
103 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetWindow) { 103 #if defined(OS_WIN)
104 // Crashes under Dr. Memory, see https://crbug.com/605880.
105 #define MAYBE_GetWindow DISABLED_GetWindow
106 #else
107 #define MAYBE_GetWindow GetWindow
108 #endif
109 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, MAYBE_GetWindow) {
104 int window_id = ExtensionTabUtil::GetWindowId(browser()); 110 int window_id = ExtensionTabUtil::GetWindowId(browser());
105 111
106 // Invalid window ID error. 112 // Invalid window ID error.
107 scoped_refptr<WindowsGetFunction> function = new WindowsGetFunction(); 113 scoped_refptr<WindowsGetFunction> function = new WindowsGetFunction();
108 scoped_refptr<Extension> extension(test_util::CreateEmptyExtension()); 114 scoped_refptr<Extension> extension(test_util::CreateEmptyExtension());
109 function->set_extension(extension.get()); 115 function->set_extension(extension.get());
110 EXPECT_TRUE(base::MatchPattern( 116 EXPECT_TRUE(base::MatchPattern(
111 utils::RunFunctionAndReturnError( 117 utils::RunFunctionAndReturnError(
112 function.get(), base::StringPrintf("[%u]", window_id + 1), browser()), 118 function.get(), base::StringPrintf("[%u]", window_id + 1), browser()),
113 keys::kWindowNotFoundError)); 119 keys::kWindowNotFoundError));
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 EXPECT_TRUE( 1738 EXPECT_TRUE(
1733 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); 1739 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl));
1734 1740
1735 // chrome.tabs.setZoomSettings(). 1741 // chrome.tabs.setZoomSettings().
1736 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); 1742 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab");
1737 EXPECT_TRUE( 1743 EXPECT_TRUE(
1738 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); 1744 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl));
1739 } 1745 }
1740 1746
1741 } // namespace extensions 1747 } // namespace extensions
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