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

Side by Side Diff: chrome/browser/browser_accessibility_win_unittest.cc

Issue 2830005: Rename browser_accessibility to browser_accessibility_win, and same for... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/scoped_ptr.h" 5 #include "base/scoped_ptr.h"
6 #include "chrome/browser/browser_accessibility_manager.h" 6 #include "chrome/browser/browser_accessibility_manager_win.h"
7 #include "chrome/browser/browser_accessibility.h" 7 #include "chrome/browser/browser_accessibility_win.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using webkit_glue::WebAccessibility; 10 using webkit_glue::WebAccessibility;
11 11
12 // Subclass of BrowserAccessibility that counts the number of instances. 12 // Subclass of BrowserAccessibility that counts the number of instances.
13 class CountedBrowserAccessibility : public BrowserAccessibility { 13 class CountedBrowserAccessibility : public BrowserAccessibility {
14 public: 14 public:
15 CountedBrowserAccessibility() { global_obj_count_++; } 15 CountedBrowserAccessibility() { global_obj_count_++; }
16 virtual ~CountedBrowserAccessibility() { global_obj_count_--; } 16 virtual ~CountedBrowserAccessibility() { global_obj_count_--; }
17 static int global_obj_count_; 17 static int global_obj_count_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 delete manager; 102 delete manager;
103 ASSERT_EQ(2, CountedBrowserAccessibility::global_obj_count_); 103 ASSERT_EQ(2, CountedBrowserAccessibility::global_obj_count_);
104 104
105 // Release each of our references and make sure that each one results in 105 // Release each of our references and make sure that each one results in
106 // the instance being deleted as its reference count hits zero. 106 // the instance being deleted as its reference count hits zero.
107 root_iaccessible->Release(); 107 root_iaccessible->Release();
108 ASSERT_EQ(1, CountedBrowserAccessibility::global_obj_count_); 108 ASSERT_EQ(1, CountedBrowserAccessibility::global_obj_count_);
109 child1_iaccessible->Release(); 109 child1_iaccessible->Release();
110 ASSERT_EQ(0, CountedBrowserAccessibility::global_obj_count_); 110 ASSERT_EQ(0, CountedBrowserAccessibility::global_obj_count_);
111 } 111 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_accessibility_win.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698