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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model_unittest.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/tabs/tab_strip_model.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 DictionaryValue manifest; 1714 DictionaryValue manifest;
1715 manifest.SetString("name", "hi!"); 1715 manifest.SetString("name", "hi!");
1716 manifest.SetString("version", "1"); 1716 manifest.SetString("version", "1");
1717 manifest.SetString("app.launch.web_url", "http://www.google.com"); 1717 manifest.SetString("app.launch.web_url", "http://www.google.com");
1718 std::string error; 1718 std::string error;
1719 scoped_refptr<Extension> extension_app( 1719 scoped_refptr<Extension> extension_app(
1720 Extension::Create(path, extensions::Manifest::INVALID_LOCATION, 1720 Extension::Create(path, extensions::Manifest::INVALID_LOCATION,
1721 manifest, Extension::NO_FLAGS, &error)); 1721 manifest, Extension::NO_FLAGS, &error));
1722 WebContents* contents1 = CreateWebContents(); 1722 WebContents* contents1 = CreateWebContents();
1723 extensions::TabHelper::CreateForWebContents(contents1); 1723 extensions::TabHelper::CreateForWebContents(contents1);
1724 extensions::TabHelper::FromWebContents(contents1)-> 1724 extensions::TabHelper::FromWebContents(contents1)
1725 SetExtensionApp(extension_app); 1725 ->SetExtensionApp(extension_app.get());
1726 WebContents* contents2 = CreateWebContents(); 1726 WebContents* contents2 = CreateWebContents();
1727 extensions::TabHelper::CreateForWebContents(contents2); 1727 extensions::TabHelper::CreateForWebContents(contents2);
1728 extensions::TabHelper::FromWebContents(contents2)-> 1728 extensions::TabHelper::FromWebContents(contents2)
1729 SetExtensionApp(extension_app); 1729 ->SetExtensionApp(extension_app.get());
1730 WebContents* contents3 = CreateWebContents(); 1730 WebContents* contents3 = CreateWebContents();
1731 1731
1732 SetID(contents1, 1); 1732 SetID(contents1, 1);
1733 SetID(contents2, 2); 1733 SetID(contents2, 2);
1734 SetID(contents3, 3); 1734 SetID(contents3, 3);
1735 1735
1736 // Note! The ordering of these tests is important, each subsequent test 1736 // Note! The ordering of these tests is important, each subsequent test
1737 // builds on the state established in the previous. This is important if you 1737 // builds on the state established in the previous. This is important if you
1738 // ever insert tests rather than append. 1738 // ever insert tests rather than append.
1739 1739
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 strip.ActivateTabAt(1, true); 2333 strip.ActivateTabAt(1, true);
2334 ASSERT_EQ(1, observer.GetStateCount()); 2334 ASSERT_EQ(1, observer.GetStateCount());
2335 State s(contents2, 1, MockTabStripModelObserver::SELECT); 2335 State s(contents2, 1, MockTabStripModelObserver::SELECT);
2336 s.src_contents = contents2; 2336 s.src_contents = contents2;
2337 s.src_index = 1; 2337 s.src_index = 1;
2338 s.change_reason = TabStripModelObserver::CHANGE_REASON_NONE; 2338 s.change_reason = TabStripModelObserver::CHANGE_REASON_NONE;
2339 EXPECT_TRUE(observer.StateEquals(0, s)); 2339 EXPECT_TRUE(observer.StateEquals(0, s));
2340 strip.RemoveObserver(&observer); 2340 strip.RemoveObserver(&observer);
2341 strip.CloseAllTabs(); 2341 strip.CloseAllTabs();
2342 } 2342 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_audio_indicator.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698