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

Side by Side Diff: chrome/browser/extensions/extension_uitest.cc

Issue 126074: Change extension id format back to mp-decimal, and change the (Closed)
Patch Set: make all the tests work again Created 11 years, 6 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
OLDNEW
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/gfx/rect.h" 6 #include "base/gfx/rect.h"
7 #include "base/json_reader.h" 7 #include "base/json_reader.h"
8 #include "base/json_writer.h" 8 #include "base/json_writer.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/automation/extension_automation_constants.h" 10 #include "chrome/browser/automation/extension_automation_constants.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 private: 96 private:
97 DISALLOW_COPY_AND_ASSIGN(SimpleApiCallExtensionTest); 97 DISALLOW_COPY_AND_ASSIGN(SimpleApiCallExtensionTest);
98 }; 98 };
99 99
100 // TODO(port) Should become portable once ExternalTabMessageLoop is ported. 100 // TODO(port) Should become portable once ExternalTabMessageLoop is ported.
101 #if defined(OS_WIN) 101 #if defined(OS_WIN)
102 TEST_F(SimpleApiCallExtensionTest, RunTest) { 102 TEST_F(SimpleApiCallExtensionTest, RunTest) {
103 namespace keys = extension_automation_constants; 103 namespace keys = extension_automation_constants;
104 104
105 TestWithURL(GURL( 105 TestWithURL(GURL(
106 "chrome-extension://fc6f6ba6693faf6773c13701019f2e7a12f0febe/test.html")); 106 "chrome-extension://pmgpglkggjdpkpghhdmbdhababjpcohk/test.html"));
107 AutomationProxyForExternalTab* proxy = 107 AutomationProxyForExternalTab* proxy =
108 static_cast<AutomationProxyForExternalTab*>(automation()); 108 static_cast<AutomationProxyForExternalTab*>(automation());
109 ASSERT_GT(proxy->messages_received(), 0); 109 ASSERT_GT(proxy->messages_received(), 0);
110 110
111 // Using EXPECT_TRUE rather than EXPECT_EQ as the compiler (VC++) isn't 111 // Using EXPECT_TRUE rather than EXPECT_EQ as the compiler (VC++) isn't
112 // finding the right match for EqHelper. 112 // finding the right match for EqHelper.
113 EXPECT_TRUE(proxy->origin() == keys::kAutomationOrigin); 113 EXPECT_TRUE(proxy->origin() == keys::kAutomationOrigin);
114 EXPECT_TRUE(proxy->target() == keys::kAutomationRequestTarget); 114 EXPECT_TRUE(proxy->target() == keys::kAutomationRequestTarget);
115 115
116 scoped_ptr<Value> message_value(JSONReader::Read(proxy->message(), false)); 116 scoped_ptr<Value> message_value(JSONReader::Read(proxy->message(), false));
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 private: 264 private:
265 DISALLOW_COPY_AND_ASSIGN(RoundtripApiCallExtensionTest); 265 DISALLOW_COPY_AND_ASSIGN(RoundtripApiCallExtensionTest);
266 }; 266 };
267 267
268 // TODO(port) Should become portable once 268 // TODO(port) Should become portable once
269 // ExternalTabMessageLoop is ported. 269 // ExternalTabMessageLoop is ported.
270 #if defined(OS_WIN) 270 #if defined(OS_WIN)
271 TEST_F(RoundtripApiCallExtensionTest, RunTest) { 271 TEST_F(RoundtripApiCallExtensionTest, RunTest) {
272 TestWithURL(GURL( 272 TestWithURL(GURL(
273 "chrome-extension://e5ead92b2c6795c1d2b92df9c5cb37de5582471a/test.html")); 273 "chrome-extension://ofoknjclcmghjfmbncljcnpjmfmldhno/test.html"));
274 RoundtripAutomationProxy* proxy = 274 RoundtripAutomationProxy* proxy =
275 static_cast<RoundtripAutomationProxy*>(automation()); 275 static_cast<RoundtripAutomationProxy*>(automation());
276 276
277 // Validation is done in the RoundtripAutomationProxy, so we just check 277 // Validation is done in the RoundtripAutomationProxy, so we just check
278 // something basic here. 278 // something basic here.
279 EXPECT_EQ(proxy->messages_received(), 2); 279 EXPECT_EQ(proxy->messages_received(), 2);
280 } 280 }
281 #endif // defined(OS_WIN) 281 #endif // defined(OS_WIN)
282 282
283 } // namespace 283 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_ui_unittest.cc ('k') | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698