| OLD | NEW |
| 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" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); | 411 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); |
| 412 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); | 412 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); |
| 413 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); | 413 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); |
| 414 | 414 |
| 415 std::string error; | 415 std::string error; |
| 416 scoped_refptr<Extension> extension = Extension::Create( | 416 scoped_refptr<Extension> extension = Extension::Create( |
| 417 full_path, location, *input_value, Extension::NO_FLAGS, &error); | 417 full_path, location, *input_value, Extension::NO_FLAGS, &error); |
| 418 EXPECT_TRUE(extension.get()); | 418 EXPECT_TRUE(extension.get()); |
| 419 EXPECT_STREQ("", error.c_str()); | 419 EXPECT_STREQ("", error.c_str()); |
| 420 browser()->profile()->GetExtensionService()-> | 420 browser()->profile()->GetExtensionService()-> |
| 421 OnExtensionInstalled(extension.get(), false /* not from webstore */, | 421 OnExtensionInstalled(extension.get(), syncer::StringOrdinal(), |
| 422 syncer::StringOrdinal(), | |
| 423 false /* no requirement errors */); | 422 false /* no requirement errors */); |
| 424 return extension; | 423 return extension; |
| 425 } | 424 } |
| 426 | 425 |
| 427 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area, | 426 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area, |
| 428 const gfx::Rect& work_area) { | 427 const gfx::Rect& work_area) { |
| 429 DCHECK(primary_screen_area.Contains(work_area)); | 428 DCHECK(primary_screen_area.Contains(work_area)); |
| 430 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area); | 429 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area); |
| 431 mock_display_settings_provider_->SetWorkArea( | 430 mock_display_settings_provider_->SetWorkArea( |
| 432 work_area.IsEmpty() ? primary_screen_area : work_area); | 431 work_area.IsEmpty() ? primary_screen_area : work_area); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 467 } |
| 469 | 468 |
| 470 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 469 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
| 471 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 470 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
| 472 } | 471 } |
| 473 | 472 |
| 474 std::string BasePanelBrowserTest::MakePanelName(int index) { | 473 std::string BasePanelBrowserTest::MakePanelName(int index) { |
| 475 std::string panel_name("Panel"); | 474 std::string panel_name("Panel"); |
| 476 return panel_name + base::IntToString(index); | 475 return panel_name + base::IntToString(index); |
| 477 } | 476 } |
| OLD | NEW |