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

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 1155993003: Fix accessibility with out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing unittests Created 5 years, 5 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
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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 bool OnMessageReceived(const IPC::Message& message) override; 427 bool OnMessageReceived(const IPC::Message& message) override;
428 428
429 void ReceivedFrameSwap(); 429 void ReceivedFrameSwap();
430 430
431 int frames_to_wait_; 431 int frames_to_wait_;
432 base::Closure quit_; 432 base::Closure quit_;
433 433
434 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); 434 DISALLOW_COPY_AND_ASSIGN(FrameWatcher);
435 }; 435 };
436 436
437 // This observer keeps track of the last deleted RenderFrame to avoid
438 // accessing it and causing use-after-free condition.
439 class RenderFrameDeletedObserver : public WebContentsObserver {
440 public:
441 RenderFrameDeletedObserver(RenderFrameHost* rfh);
442 ~RenderFrameDeletedObserver() override;
443 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
444 bool deleted();
445 void WaitUntilDeleted();
446
447 private:
448 int process_id_;
449 int routing_id_;
450 bool deleted_;
451 scoped_ptr<base::RunLoop> runner_;
452
453 DISALLOW_COPY_AND_ASSIGN(RenderFrameDeletedObserver);
454 };
455
437 } // namespace content 456 } // namespace content
438 457
439 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 458 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698