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

Side by Side Diff: chrome/browser/ui/panels/base_panel_browser_test.cc

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix another compile error Created 8 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 | 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 "chrome/browser/ui/panels/base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_tabstrip.h" 16 #include "chrome/browser/ui/browser_tabstrip.h"
17 #include "chrome/browser/ui/panels/native_panel.h" 17 #include "chrome/browser/ui/panels/native_panel.h"
18 #include "chrome/browser/ui/panels/panel_manager.h" 18 #include "chrome/browser/ui/panels/panel_manager.h"
19 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 19 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
20 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h" 20 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h"
21 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h" 21 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h"
22 #include "chrome/browser/ui/tab_contents/tab_contents.h" 22 #include "chrome/browser/ui/tab_contents/tab_contents.h"
23 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
24 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/extensions/extension_manifest_constants.h" 26 #include "chrome/common/extensions/extension_manifest_constants.h"
27 #include "chrome/common/string_ordinal.h"
28 #include "chrome/test/base/ui_test_utils.h" 27 #include "chrome/test/base/ui_test_utils.h"
29 #include "content/public/browser/notification_service.h" 28 #include "content/public/browser/notification_service.h"
30 #include "content/public/common/url_constants.h" 29 #include "content/public/common/url_constants.h"
31 #include "content/public/test/web_contents_tester.h" 30 #include "content/public/test/web_contents_tester.h"
31 #include "sync/api/string_ordinal.h"
32 32
33 #if defined(OS_LINUX) 33 #if defined(OS_LINUX)
34 #include "chrome/browser/ui/browser_window.h" 34 #include "chrome/browser/ui/browser_window.h"
35 #include "ui/base/x/x11_util.h" 35 #include "ui/base/x/x11_util.h"
36 #endif 36 #endif
37 37
38 #if defined(OS_MACOSX) 38 #if defined(OS_MACOSX)
39 #include "base/mac/scoped_nsautorelease_pool.h" 39 #include "base/mac/scoped_nsautorelease_pool.h"
40 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 40 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
41 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 41 #include "chrome/browser/ui/cocoa/run_loop_testing.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); 421 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy());
422 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); 422 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0");
423 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); 423 input_value->SetString(extension_manifest_keys::kName, "Sample Extension");
424 424
425 std::string error; 425 std::string error;
426 scoped_refptr<Extension> extension = Extension::Create( 426 scoped_refptr<Extension> extension = Extension::Create(
427 full_path, location, *input_value, Extension::NO_FLAGS, &error); 427 full_path, location, *input_value, Extension::NO_FLAGS, &error);
428 EXPECT_TRUE(extension.get()); 428 EXPECT_TRUE(extension.get());
429 EXPECT_STREQ("", error.c_str()); 429 EXPECT_STREQ("", error.c_str());
430 browser()->profile()->GetExtensionService()-> 430 browser()->profile()->GetExtensionService()->
431 OnExtensionInstalled(extension.get(), false, StringOrdinal()); 431 OnExtensionInstalled(extension.get(), false, syncer::StringOrdinal());
432 return extension; 432 return extension;
433 } 433 }
434 434
435 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area, 435 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area,
436 const gfx::Rect& work_area) { 436 const gfx::Rect& work_area) {
437 DCHECK(primary_screen_area.Contains(work_area)); 437 DCHECK(primary_screen_area.Contains(work_area));
438 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area); 438 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area);
439 mock_display_settings_provider_->SetWorkArea( 439 mock_display_settings_provider_->SetWorkArea(
440 work_area.IsEmpty() ? primary_screen_area : work_area); 440 work_area.IsEmpty() ? primary_screen_area : work_area);
441 } 441 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 476 }
477 477
478 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { 478 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) {
479 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); 479 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position);
480 } 480 }
481 481
482 std::string BasePanelBrowserTest::MakePanelName(int index) { 482 std::string BasePanelBrowserTest::MakePanelName(int index) {
483 std::string panel_name("Panel"); 483 std::string panel_name("Panel");
484 return panel_name + base::IntToString(index); 484 return panel_name + base::IntToString(index);
485 } 485 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698