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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file contains tests for extension loading, reloading, and 5 // This file contains tests for extension loading, reloading, and
6 // unloading behavior. 6 // unloading behavior.
7 7
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Upgrade the extension. 73 // Upgrade the extension.
74 new_tab_extension = UpdateExtension( 74 new_tab_extension = UpdateExtension(
75 new_tab_extension->id(), extension_dir.Pack(), 0 /*expected upgrade*/); 75 new_tab_extension->id(), extension_dir.Pack(), 0 /*expected upgrade*/);
76 EXPECT_THAT(new_tab_extension->version()->components(), 76 EXPECT_THAT(new_tab_extension->version()->components(),
77 testing::ElementsAre(2)); 77 testing::ElementsAre(2));
78 78
79 // The extension takes a couple round-trips to the renderer in order 79 // The extension takes a couple round-trips to the renderer in order
80 // to crash, so open a new tab to wait long enough. 80 // to crash, so open a new tab to wait long enough.
81 AddTabAtIndex(browser()->tab_strip_model()->count(), 81 AddTabAtIndex(browser()->tab_strip_model()->count(),
82 GURL("http://www.google.com/"), 82 GURL("http://www.google.com/"),
83 content::PAGE_TRANSITION_TYPED); 83 ui::PAGE_TRANSITION_TYPED);
84 84
85 // Check that the extension hasn't crashed. 85 // Check that the extension hasn't crashed.
86 ExtensionRegistry* registry = ExtensionRegistry::Get(profile()); 86 ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
87 EXPECT_EQ(0U, registry->terminated_extensions().size()); 87 EXPECT_EQ(0U, registry->terminated_extensions().size());
88 EXPECT_TRUE(registry->enabled_extensions().Contains(new_tab_extension->id())); 88 EXPECT_TRUE(registry->enabled_extensions().Contains(new_tab_extension->id()));
89 } 89 }
90 90
91 } // namespace 91 } // namespace
92 } // namespace extensions 92 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698