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

Side by Side Diff: ui/accessibility/ax_tree_unittest.cc

Issue 2346473002: Revert of Add fuzzer for AXTree and fix a couple of bugs it found. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « ui/accessibility/ax_tree_fuzzer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/accessibility/ax_tree.h" 5 #include "ui/accessibility/ax_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 ASSERT_EQ(0U, fake_delegate.subtree_creation_finished_ids().size()); 472 ASSERT_EQ(0U, fake_delegate.subtree_creation_finished_ids().size());
473 473
474 ASSERT_EQ(1U, fake_delegate.node_creation_finished_ids().size()); 474 ASSERT_EQ(1U, fake_delegate.node_creation_finished_ids().size());
475 EXPECT_EQ(4, fake_delegate.node_creation_finished_ids()[0]); 475 EXPECT_EQ(4, fake_delegate.node_creation_finished_ids()[0]);
476 476
477 ASSERT_EQ(true, fake_delegate.root_changed()); 477 ASSERT_EQ(true, fake_delegate.root_changed());
478 478
479 tree.SetDelegate(NULL); 479 tree.SetDelegate(NULL);
480 } 480 }
481 481
482 // UAF caught by ax_tree_fuzzer
483 TEST(AXTreeTest, BogusAXTree) {
484 AXTreeUpdate initial_state;
485 AXNodeData node;
486 node.id = 0;
487 node.state = 0;
488 initial_state.nodes.push_back(node);
489 initial_state.nodes.push_back(node);
490 ui::AXTree tree;
491 tree.Unserialize(initial_state);
492 }
493
494 // UAF caught by ax_tree_fuzzer
495 TEST(AXTreeTest, BogusAXTree2) {
496 AXTreeUpdate initial_state;
497 AXNodeData node;
498 node.id = 0;
499 node.state = 0;
500 initial_state.nodes.push_back(node);
501 AXNodeData node2;
502 node2.id = 0;
503 node2.state = 0;
504 node2.child_ids.push_back(0);
505 node2.child_ids.push_back(0);
506 initial_state.nodes.push_back(node2);
507 ui::AXTree tree;
508 tree.Unserialize(initial_state);
509 }
510
511 } // namespace ui 482 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_tree_fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698