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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_unittest.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/browser/browser_main_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/string16.h" 5 #include "base/string16.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "content/browser/accessibility/browser_accessibility.h" 7 #include "content/browser/accessibility/browser_accessibility.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "content/common/accessibility_messages.h" 9 #include "content/common/accessibility_messages.h"
10 #include "content/common/accessibility_node_data.h" 10 #include "content/common/accessibility_node_data.h"
(...skipping 27 matching lines...) Expand all
38 static int global_obj_count_; 38 static int global_obj_count_;
39 }; 39 };
40 40
41 int CountedBrowserAccessibility::global_obj_count_ = 0; 41 int CountedBrowserAccessibility::global_obj_count_ = 0;
42 42
43 // Factory that creates a CountedBrowserAccessibility. 43 // Factory that creates a CountedBrowserAccessibility.
44 class CountedBrowserAccessibilityFactory 44 class CountedBrowserAccessibilityFactory
45 : public BrowserAccessibilityFactory { 45 : public BrowserAccessibilityFactory {
46 public: 46 public:
47 virtual ~CountedBrowserAccessibilityFactory() {} 47 virtual ~CountedBrowserAccessibilityFactory() {}
48 virtual BrowserAccessibility* Create() { 48 virtual BrowserAccessibility* Create() OVERRIDE {
49 return new CountedBrowserAccessibility(); 49 return new CountedBrowserAccessibility();
50 } 50 }
51 }; 51 };
52 52
53 } // anonymous namespace 53 } // anonymous namespace
54 54
55 TEST(BrowserAccessibilityManagerTest, TestNoLeaks) { 55 TEST(BrowserAccessibilityManagerTest, TestNoLeaks) {
56 // Create AccessibilityNodeData objects for a simple document tree, 56 // Create AccessibilityNodeData objects for a simple document tree,
57 // representing the accessibility information used to initialize 57 // representing the accessibility information used to initialize
58 // BrowserAccessibilityManager. 58 // BrowserAccessibilityManager.
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // And the new child exists. 629 // And the new child exists.
630 EXPECT_EQ(AccessibilityNodeData::ROLE_BUTTON, acc2_2->role()); 630 EXPECT_EQ(AccessibilityNodeData::ROLE_BUTTON, acc2_2->role());
631 EXPECT_EQ(3, acc2_2->renderer_id()); 631 EXPECT_EQ(3, acc2_2->renderer_id());
632 632
633 // Ensure we properly cleaned up. 633 // Ensure we properly cleaned up.
634 manager.reset(); 634 manager.reset();
635 ASSERT_EQ(0, CountedBrowserAccessibility::global_obj_count_); 635 ASSERT_EQ(0, CountedBrowserAccessibility::global_obj_count_);
636 } 636 }
637 637
638 } // namespace content 638 } // namespace content
OLDNEW
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/browser/browser_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698