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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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) 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "content/public/browser/web_contents.h" 68 #include "content/public/browser/web_contents.h"
69 #include "content/public/browser/web_contents_observer.h" 69 #include "content/public/browser/web_contents_observer.h"
70 #include "content/public/browser/web_contents_view.h" 70 #include "content/public/browser/web_contents_view.h"
71 #include "content/public/common/frame_navigate_params.h" 71 #include "content/public/common/frame_navigate_params.h"
72 #include "content/public/common/page_transition_types.h" 72 #include "content/public/common/page_transition_types.h"
73 #include "content/public/common/renderer_preferences.h" 73 #include "content/public/common/renderer_preferences.h"
74 #include "content/public/common/url_constants.h" 74 #include "content/public/common/url_constants.h"
75 #include "content/public/test/browser_test_utils.h" 75 #include "content/public/test/browser_test_utils.h"
76 #include "content/public/test/test_navigation_observer.h" 76 #include "content/public/test/test_navigation_observer.h"
77 #include "extensions/common/extension.h" 77 #include "extensions/common/extension.h"
78 #include "extensions/common/extension_set.h"
78 #include "grit/chromium_strings.h" 79 #include "grit/chromium_strings.h"
79 #include "grit/generated_resources.h" 80 #include "grit/generated_resources.h"
80 #include "net/dns/mock_host_resolver.h" 81 #include "net/dns/mock_host_resolver.h"
81 #include "net/test/spawned_test_server/spawned_test_server.h" 82 #include "net/test/spawned_test_server/spawned_test_server.h"
82 #include "ui/base/l10n/l10n_util.h" 83 #include "ui/base/l10n/l10n_util.h"
83 84
84 #if defined(OS_MACOSX) 85 #if defined(OS_MACOSX)
85 #include "base/mac/mac_util.h" 86 #include "base/mac/mac_util.h"
86 #include "base/mac/scoped_nsautorelease_pool.h" 87 #include "base/mac/scoped_nsautorelease_pool.h"
87 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 88 #include "chrome/browser/ui/cocoa/run_loop_testing.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 return page_title; 347 return page_title;
347 #else 348 #else
348 // Do we need to use the above code on POSIX as well? 349 // Do we need to use the above code on POSIX as well?
349 return page_title; 350 return page_title;
350 #endif 351 #endif
351 } 352 }
352 353
353 // Returns the app extension aptly named "App Test". 354 // Returns the app extension aptly named "App Test".
354 const Extension* GetExtension() { 355 const Extension* GetExtension() {
355 const ExtensionSet* extensions = extensions::ExtensionSystem::Get( 356 const extensions::ExtensionSet* extensions =
356 browser()->profile())->extension_service()->extensions(); 357 extensions::ExtensionSystem::Get(
357 for (ExtensionSet::const_iterator it = extensions->begin(); 358 browser()->profile())->extension_service()->extensions();
359 for (extensions::ExtensionSet::const_iterator it = extensions->begin();
358 it != extensions->end(); ++it) { 360 it != extensions->end(); ++it) {
359 if ((*it)->name() == "App Test") 361 if ((*it)->name() == "App Test")
360 return it->get(); 362 return it->get();
361 } 363 }
362 NOTREACHED(); 364 NOTREACHED();
363 return NULL; 365 return NULL;
364 } 366 }
365 }; 367 };
366 368
367 // Launch the app on a page with no title, check that the app title was set 369 // Launch the app on a page with no title, check that the app title was set
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 exp_commit_size.Enlarge(wcv_resize_insets.width(), 2555 exp_commit_size.Enlarge(wcv_resize_insets.width(),
2554 wcv_resize_insets.height() + height_inset); 2556 wcv_resize_insets.height() + height_inset);
2555 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2557 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2556 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2558 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2557 // Sizes of RenderWidgetHostView and WebContentsView before and after 2559 // Sizes of RenderWidgetHostView and WebContentsView before and after
2558 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. 2560 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same.
2559 EXPECT_EQ(rwhv_commit_size2, 2561 EXPECT_EQ(rwhv_commit_size2,
2560 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2562 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2561 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); 2563 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize());
2562 } 2564 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698