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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 .Build(); 54 .Build();
55 } 55 }
56 56
57 class ActiveTabTest : public ChromeRenderViewHostTestHarness { 57 class ActiveTabTest : public ChromeRenderViewHostTestHarness {
58 public: 58 public:
59 ActiveTabTest() 59 ActiveTabTest()
60 : permissions_info_(ChromeAPIPermissions()), 60 : permissions_info_(ChromeAPIPermissions()),
61 extension(CreateTestExtension("deadbeef", true)), 61 extension(CreateTestExtension("deadbeef", true)),
62 another_extension(CreateTestExtension("feedbeef", true)), 62 another_extension(CreateTestExtension("feedbeef", true)),
63 extension_without_active_tab(CreateTestExtension("badbeef", false)), 63 extension_without_active_tab(CreateTestExtension("badbeef", false)),
64 ui_thread_(BrowserThread::UI, MessageLoop::current()) {} 64 ui_thread_(BrowserThread::UI, base::MessageLoop::current()) {}
65 65
66 protected: 66 protected:
67 virtual void SetUp() OVERRIDE { 67 virtual void SetUp() OVERRIDE {
68 ChromeRenderViewHostTestHarness::SetUp(); 68 ChromeRenderViewHostTestHarness::SetUp();
69 TabHelper::CreateForWebContents(web_contents()); 69 TabHelper::CreateForWebContents(web_contents());
70 } 70 }
71 71
72 int tab_id() { 72 int tab_id() {
73 return SessionID::IdForTab(web_contents()); 73 return SessionID::IdForTab(web_contents());
74 } 74 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 Reload(); 319 Reload();
320 320
321 EXPECT_FALSE(IsAllowed(extension, google, tab_id())); 321 EXPECT_FALSE(IsAllowed(extension, google, tab_id()));
322 EXPECT_FALSE(IsAllowed(extension, google_h1, tab_id())); 322 EXPECT_FALSE(IsAllowed(extension, google_h1, tab_id()));
323 EXPECT_FALSE(IsAllowed(extension, chromium, tab_id())); 323 EXPECT_FALSE(IsAllowed(extension, chromium, tab_id()));
324 EXPECT_FALSE(IsAllowed(extension, chromium_h1, tab_id())); 324 EXPECT_FALSE(IsAllowed(extension, chromium_h1, tab_id()));
325 } 325 }
326 326
327 } // namespace 327 } // namespace
328 } // namespace extensions 328 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698