Home
last modified time | relevance | path

Searched refs:model (Results 1 – 25 of 1839) sorted by relevance

12345678910>>...74

/external/chromium_org/ui/views/controls/textfield/
Dtextfield_model_unittest.cc37 void MoveCursorTo(views::TextfieldModel& model, size_t pos) { in MoveCursorTo() argument
38 model.MoveCursorTo(gfx::SelectionModel(pos, gfx::CURSOR_FORWARD)); in MoveCursorTo()
58 void ResetModel(TextfieldModel* model) const { in ResetModel()
59 model->SetText(base::string16()); in ResetModel()
60 model->ClearEditHistory(); in ResetModel()
70 TextfieldModel model(NULL); in TEST_F() local
72 model.Append(base::ASCIIToUTF16("HILL")); in TEST_F()
73 EXPECT_STR_EQ("HILL", model.text()); in TEST_F()
74 model.Append(base::ASCIIToUTF16("WORLD")); in TEST_F()
75 EXPECT_STR_EQ("HILLWORLD", model.text()); in TEST_F()
[all …]
/external/chromium_org/ui/base/models/
Dlist_selection_model_unittest.cc19 static std::string StateAsString(const ListSelectionModel& model) { in StateAsString() argument
20 std::string result = "active=" + base::IntToString(model.active()) + in StateAsString()
21 " anchor=" + base::IntToString(model.anchor()) + in StateAsString()
24 model.selected_indices()); in StateAsString()
34 ListSelectionModel model; in TEST_F() local
35 EXPECT_EQ("active=-1 anchor=-1 selection=", StateAsString(model)); in TEST_F()
36 EXPECT_TRUE(model.empty()); in TEST_F()
40 ListSelectionModel model; in TEST_F() local
41 model.SetSelectedIndex(2); in TEST_F()
42 EXPECT_EQ("active=2 anchor=2 selection=2", StateAsString(model)); in TEST_F()
[all …]
Dlist_model_unittest.cc73 ListModel<FooItem> model; in TEST_F() local
74 model.AddObserver(this); in TEST_F()
77 model.Add(new FooItem(0)); in TEST_F()
81 model.Add(new FooItem(1)); in TEST_F()
85 model.AddAt(0, new FooItem(2)); in TEST_F()
89 EXPECT_EQ(3U, model.item_count()); in TEST_F()
92 EXPECT_EQ(2, model.GetItemAt(0)->id()); in TEST_F()
93 EXPECT_EQ(0, model.GetItemAt(1)->id()); in TEST_F()
94 EXPECT_EQ(1, model.GetItemAt(2)->id()); in TEST_F()
98 ListModel<FooItem> model; in TEST_F() local
[all …]
/external/chromium_org/chrome/browser/ui/toolbar/
Drecent_tabs_sub_menu_model_unittest.cc73 explicit TestRecentTabsMenuModelDelegate(ui::MenuModel* model) in TestRecentTabsMenuModelDelegate() argument
74 : model_(model), in TestRecentTabsMenuModelDelegate()
176 TestRecentTabsSubMenuModel model(NULL, browser(), NULL); in TEST_F() local
185 int num_items = model.GetItemCount(); in TEST_F()
187 EXPECT_FALSE(model.IsEnabledAt(0)); in TEST_F()
188 EXPECT_FALSE(model.IsEnabledAt(2)); in TEST_F()
189 EXPECT_EQ(0, model.enable_count()); in TEST_F()
191 EXPECT_EQ(NULL, model.GetLabelFontListAt(0)); in TEST_F()
192 EXPECT_EQ(NULL, model.GetLabelFontListAt(1)); in TEST_F()
193 EXPECT_EQ(NULL, model.GetLabelFontListAt(2)); in TEST_F()
[all …]
/external/chromium_org/chrome/browser/undo/
Dbookmark_undo_service_test.cc58 BookmarkModel* model = GetModel(); in TEST_F() local
60 model->AddObserver(undo_service); in TEST_F()
62 const BookmarkNode* parent = model->other_node(); in TEST_F()
63 model->AddURL(parent, 0, ASCIIToUTF16("foo"), GURL("http://www.bar.com")); in TEST_F()
67 EXPECT_EQ(0, model->other_node()->child_count()); in TEST_F()
78 BookmarkModel* model = GetModel(); in TEST_F() local
80 model->AddObserver(undo_service); in TEST_F()
82 const BookmarkNode* parent = model->other_node(); in TEST_F()
83 model->AddURL(parent, 0, ASCIIToUTF16("foo"), GURL("http://www.bar.com")); in TEST_F()
84 model->Remove(parent, 0); in TEST_F()
[all …]
/external/chromium_org/ui/views/
Dview_model_unittest.cc16 std::string BoundsString(const ViewModel& model) { in BoundsString() argument
18 for (int i = 0; i < model.view_size(); ++i) { in BoundsString()
21 result += base::IntToString(model.ideal_bounds(i).x()); in BoundsString()
27 std::string ViewIDsString(const ViewModel& model) { in ViewIDsString() argument
29 for (int i = 0; i < model.view_size(); ++i) { in ViewIDsString()
32 result += base::IntToString(model.view_at(i)->id()); in ViewIDsString()
41 ViewModel model; in TEST() local
42 model.Add(&v1, 0); in TEST()
43 EXPECT_EQ(1, model.view_size()); in TEST()
44 EXPECT_EQ(&v1, model.view_at(0)); in TEST()
[all …]
Dview_model_utils_unittest.cc16 ViewModel model; in TEST() local
17 model.Add(&v1, 0); in TEST()
19 model.set_ideal_bounds(0, v1_bounds); in TEST()
20 ViewModelUtils::SetViewBoundsToIdealBounds(model); in TEST()
27 ViewModel model; in TEST() local
28 model.Add(&v1, 0); in TEST()
29 model.Add(&v2, 1); in TEST()
30 model.Add(&v3, 2); in TEST()
31 model.set_ideal_bounds(0, gfx::Rect(0, 0, 10, 10)); in TEST()
32 model.set_ideal_bounds(1, gfx::Rect(10, 0, 1000, 10)); in TEST()
[all …]
Dview_model_utils.cc26 void ViewModelUtils::SetViewBoundsToIdealBounds(const ViewModel& model) { in SetViewBoundsToIdealBounds() argument
27 for (int i = 0; i < model.view_size(); ++i) in SetViewBoundsToIdealBounds()
28 model.view_at(i)->SetBoundsRect(model.ideal_bounds(i)); in SetViewBoundsToIdealBounds()
32 bool ViewModelUtils::IsAtIdealBounds(const ViewModel& model) { in IsAtIdealBounds() argument
33 for (int i = 0; i < model.view_size(); ++i) { in IsAtIdealBounds()
34 View* view = model.view_at(i); in IsAtIdealBounds()
35 if (view->bounds() != model.ideal_bounds(i)) in IsAtIdealBounds()
42 int ViewModelUtils::DetermineMoveIndex(const ViewModel& model, in DetermineMoveIndex() argument
48 int current_index = model.GetIndexOfView(view); in DetermineMoveIndex()
53 model.ideal_bounds(i).x() + model.ideal_bounds(i).width() / 2, in DetermineMoveIndex()
[all …]
/external/chromium_org/chrome/browser/ui/autofill/
Daccount_chooser_model_unittest.cc55 TestAccountChooserModel* model() { return &model_; } in model() function in autofill::__anone3f9394d0111::AccountChooserModelTest
72 TestAccountChooserModel model(delegate(), in TEST_F() local
76 EXPECT_TRUE(model.WalletIsSelected()); in TEST_F()
82 TestAccountChooserModel model(delegate(), in TEST_F() local
86 EXPECT_FALSE(model.WalletIsSelected()); in TEST_F()
93 TestAccountChooserModel model(delegate(), profile(), true, metric_logger()); in TEST_F() local
94 EXPECT_FALSE(model.WalletIsSelected()); in TEST_F()
107 TestAccountChooserModel model(delegate(), in TEST_F() local
111 EXPECT_FALSE(model.WalletIsSelected()); in TEST_F()
118 EXPECT_TRUE(model()->WalletIsSelected()); in TEST_F()
[all …]
/external/chromium_org/components/bookmarks/browser/
Dbookmark_utils_unittest.cc59 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) OVERRIDE { in GroupedBookmarkChangesBeginning() argument
63 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) OVERRIDE { in GroupedBookmarkChangesEnded() argument
78 scoped_ptr<BookmarkModel> model(client.CreateModel(false)); in TEST_F() local
79 const BookmarkNode* node1 = model->AddURL(model->other_node(), in TEST_F()
83 const BookmarkNode* node2 = model->AddURL(model->other_node(), in TEST_F()
88 model->AddFolder(model->other_node(), 0, ASCIIToUTF16("foo")); in TEST_F()
94 GetBookmarksMatchingProperties(model.get(), query, 100, string(), &nodes); in TEST_F()
100 GetBookmarksMatchingProperties(model.get(), query, 100, string(), &nodes); in TEST_F()
106 GetBookmarksMatchingProperties(model.get(), query, 100, string(), &nodes); in TEST_F()
114 GetBookmarksMatchingProperties(model.get(), query, 100, string(), &nodes); in TEST_F()
[all …]
Dbookmark_model_observer.h19 virtual void BookmarkModelLoaded(BookmarkModel* model,
23 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} in BookmarkModelBeingDeleted() argument
26 virtual void BookmarkNodeMoved(BookmarkModel* model,
35 virtual void OnWillAddBookmarkNode(BookmarkModel* model, in OnWillAddBookmarkNode() argument
39 virtual void BookmarkNodeAdded(BookmarkModel* model,
47 virtual void OnWillRemoveBookmarks(BookmarkModel* model, in OnWillRemoveBookmarks() argument
59 virtual void BookmarkNodeRemoved(BookmarkModel* model,
66 virtual void OnWillChangeBookmarkNode(BookmarkModel* model, in OnWillChangeBookmarkNode() argument
70 virtual void BookmarkNodeChanged(BookmarkModel* model,
74 virtual void OnWillChangeBookmarkMetaInfo(BookmarkModel* model, in OnWillChangeBookmarkMetaInfo() argument
[all …]
/external/chromium_org/chrome/browser/ui/views/frame/
Dsystem_menu_model_builder.cc38 ui::SimpleMenuModel* model = new ui::SimpleMenuModel(&menu_delegate_); in Init() local
39 menu_model_.reset(model); in Init()
40 BuildMenu(model); in Init()
46 model->AddSeparator(ui::NORMAL_SEPARATOR); in Init()
50 void SystemMenuModelBuilder::BuildMenu(ui::SimpleMenuModel* model) { in BuildMenu() argument
54 BuildSystemMenuForBrowserWindow(model); in BuildMenu()
56 BuildSystemMenuForAppOrPopupWindow(model); in BuildMenu()
57 AddFrameToggleItems(model); in BuildMenu()
61 ui::SimpleMenuModel* model) { in BuildSystemMenuForBrowserWindow() argument
62 model->AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB); in BuildSystemMenuForBrowserWindow()
[all …]
/external/chromium-trace/trace-viewer/src/tracing/
Dtrace_model_settings_test.js13 var model = new tracing.TraceModel();
14 var p1 = model.getOrCreateProcess(1);
15 var settings = new tracing.TraceModelSettings(model);
20 var model = new tracing.TraceModel();
21 var p1 = model.getOrCreateProcess(1);
23 var settings = new tracing.TraceModelSettings(model);
28 var model = new tracing.TraceModel();
29 var p1 = model.getOrCreateProcess(1);
30 var p2 = model.getOrCreateProcess(2);
33 var settings = new tracing.TraceModelSettings(model);
[all …]
/external/chromium_org/third_party/WebKit/Tools/GardeningServer/scripts/
Dmodel_unittests.js99 var queue = model.takeRebaselineQueue();
101 model.queueForRebaseline('failureInfo1');
102 model.queueForRebaseline('failureInfo2');
103 var queue = model.takeRebaselineQueue();
105 var queue = model.takeRebaselineQueue();
110 var queue = model.takeExpectationUpdateQueue();
112 model.queueForExpectationUpdate('failureInfo1');
113 model.queueForExpectationUpdate('failureInfo2');
114 var queue = model.takeExpectationUpdateQueue();
116 var queue = model.takeExpectationUpdateQueue();
[all …]
Dmodel.js26 var model = model || {}; variable
32 model.state = {};
33 model.state.failureAnalysisByTest = {};
34 model.state.rebaselineQueue = [];
35 model.state.expectationsUpdateQueue = [];
59 var commitDataList = model.state.recentCommits;
76 model.queueForRebaseline = function(failureInfo)
78 model.state.rebaselineQueue.push(failureInfo);
81 model.takeRebaselineQueue = function()
83 var queue = model.state.rebaselineQueue;
[all …]
/external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/
DTabModelUtils.java22 public static boolean closeTabByIndex(TabModel model, int index) { in closeTabByIndex() argument
23 Tab tab = model.getTabAt(index); in closeTabByIndex()
26 return model.closeTab(tab); in closeTabByIndex()
34 public static boolean closeTabById(TabModel model, int tabId) { in closeTabById() argument
35 return closeTabById(model, tabId, false); in closeTabById()
44 public static boolean closeTabById(TabModel model, int tabId, boolean canUndo) { in closeTabById() argument
45 Tab tab = TabModelUtils.getTabById(model, tabId); in closeTabById()
48 return model.closeTab(tab, true, false, canUndo); in closeTabById()
55 public static boolean closeCurrentTab(TabModel model) { in closeCurrentTab() argument
56 Tab tab = TabModelUtils.getCurrentTab(model); in closeCurrentTab()
[all …]
/external/chromium_org/ui/views/controls/menu/
Dmenu_model_adapter.cc56 MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model, in AddMenuItemFromModelAt() argument
62 model->GetIconAt(model_index, &icon); in AddMenuItemFromModelAt()
66 ui::MenuModel::ItemType menu_type = model->GetTypeAt(model_index); in AddMenuItemFromModelAt()
71 label = model->GetLabelAt(model_index); in AddMenuItemFromModelAt()
72 sublabel = model->GetSublabelAt(model_index); in AddMenuItemFromModelAt()
73 minor_text = model->GetMinorTextAt(model_index); in AddMenuItemFromModelAt()
77 label = model->GetLabelAt(model_index); in AddMenuItemFromModelAt()
78 sublabel = model->GetSublabelAt(model_index); in AddMenuItemFromModelAt()
79 minor_text = model->GetMinorTextAt(model_index); in AddMenuItemFromModelAt()
83 label = model->GetLabelAt(model_index); in AddMenuItemFromModelAt()
[all …]
/external/chromium_org/chrome/browser/search_engines/
Dtemplate_url_service_unittest.cc88 TemplateURLService* model, in CreateKeywordWithDate() argument
117 TemplateURLService* model, in AddKeywordWithDate() argument
129 model, short_name, keyword, url, suggest_url, alternate_url,favicon_url, in AddKeywordWithDate()
131 model->Add(t_url); in AddKeywordWithDate()
190 TemplateURLService* model() { return test_util_.model(); } in model() function in TemplateURLServiceTest
192 return model()->search_terms_data(); in search_terms_data()
238 return ::AddKeywordWithDate(model(), short_name, keyword, url, suggest_url, in AddKeywordWithDate()
299 const size_t initial_count = model()->GetTemplateURLs().size(); in TEST_F()
311 model()->Add(t_url); in TEST_F()
312 ASSERT_TRUE(model()->CanReplaceKeyword(ASCIIToUTF16("keyword"), GURL(), in TEST_F()
[all …]
Dtemplate_url_service_sync_unittest.cc161 TemplateURLService* model() { return test_util_a_.model(); } in model() function in TemplateURLServiceSyncTest
164 TemplateURLService* model_a() { return test_util_a_.model(); } in model_a()
378 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com")); in TEST_F()
379 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://key2.com")); in TEST_F()
380 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com")); in TEST_F()
382 model()->GetAllSyncData(syncer::SEARCH_ENGINES); in TEST_F()
389 const TemplateURL* service_turl = model()->GetTemplateURLForGUID(guid); in TEST_F()
396 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com")); in TEST_F()
397 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://key2.com")); in TEST_F()
398 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key3"), in TEST_F()
[all …]
/external/chromium_org/chrome/browser/task_manager/
Dtask_manager_unittest.cc70 TaskManagerModel* model = task_manager.model_.get(); in TEST_F() local
71 EXPECT_EQ(0, model->ResourceCount()); in TEST_F()
76 TaskManagerModel* model = task_manager.model_.get(); in TEST_F() local
81 ASSERT_EQ(1, model->ResourceCount()); in TEST_F()
82 EXPECT_TRUE(model->IsResourceFirstInGroup(0)); in TEST_F()
83 EXPECT_EQ(ASCIIToUTF16("test title"), model->GetResourceTitle(0)); in TEST_F()
84 EXPECT_EQ(ASCIIToUTF16("test profile"), model->GetResourceProfileName(0)); in TEST_F()
86 model->GetResourceNetworkUsage(0)); in TEST_F()
87 EXPECT_EQ(ASCIIToUTF16(kZeroCPUUsage), model->GetResourceCPUUsage(0)); in TEST_F()
90 ASSERT_EQ(2, model->ResourceCount()); in TEST_F()
[all …]
/external/chromium_org/components/autofill/core/browser/
Dautofill_data_model_unittest.cc36 TestAutofillDataModel model("guid", std::string()); in TEST() local
37 EXPECT_FALSE(model.IsVerified()); in TEST()
39 model.set_origin("http://www.example.com"); in TEST()
40 EXPECT_FALSE(model.IsVerified()); in TEST()
42 model.set_origin("https://www.example.com"); in TEST()
43 EXPECT_FALSE(model.IsVerified()); in TEST()
45 model.set_origin("file:///tmp/example.txt"); in TEST()
46 EXPECT_FALSE(model.IsVerified()); in TEST()
48 model.set_origin("data:text/plain;charset=utf-8;base64,ZXhhbXBsZQ=="); in TEST()
49 EXPECT_FALSE(model.IsVerified()); in TEST()
[all …]
/external/opencv/cvaux/src/
Dcvbgfg_codebook.cpp45 CvBGCodeBookModel* model = (CvBGCodeBookModel*)cvAlloc( sizeof(*model) ); in cvCreateBGCodeBookModel() local
46 memset( model, 0, sizeof(*model) ); in cvCreateBGCodeBookModel()
47 model->cbBounds[0] = model->cbBounds[1] = model->cbBounds[2] = 10; in cvCreateBGCodeBookModel()
48 model->modMin[0] = 3; in cvCreateBGCodeBookModel()
49 model->modMax[0] = 10; in cvCreateBGCodeBookModel()
50 model->modMin[1] = model->modMin[2] = 1; in cvCreateBGCodeBookModel()
51 model->modMax[1] = model->modMax[2] = 1; in cvCreateBGCodeBookModel()
52 model->storage = cvCreateMemStorage(); in cvCreateBGCodeBookModel()
54 return model; in cvCreateBGCodeBookModel()
57 void cvReleaseBGCodeBookModel( CvBGCodeBookModel** model ) in cvReleaseBGCodeBookModel() argument
[all …]
/external/chromium_org/tools/perf/metrics/
Dtimeline_unittest.py9 from telemetry.timeline import model as model_module
17 def GetResults(self, metric, model, renderer_thread, interaction_records): argument
19 metric.AddResults(model, renderer_thread, interaction_records, results)
23 model = model_module.TimelineModel()
24 renderer_main = model.GetOrCreateProcess(1).GetOrCreateThread(2)
31 model.FinalizeImport()
35 metric, model=model, renderer_thread=renderer_main,
45 model = model_module.TimelineModel()
46 renderer_main = model.GetOrCreateProcess(1).GetOrCreateThread(2)
56 model.FinalizeImport()
[all …]
/external/chromium_org/tools/deep_memory_profiler/visualizer/static/
Dprofiler_unittest.js10 var modelIsValid = function(model) { argument
12 if (!('name' in model) || !('id' in model))
16 if ('children' in model && 'size' in model ||
17 !('children' in model) && !('size' in model))
21 if ('subs' in model && !('template' in model) ||
22 !('subs' in model) && 'template' in model)
26 if ('children' in model) {
27 return model.children.reduce(function(previous, current) {
43 models.forEach(function(model) { argument
44 ok(modelIsValid(model));
/external/chromium_org/chrome/browser/ui/search/
Dsearch_model_unittest.cc73 SearchModel* model; member in SearchModelTest
82 model = search_tab_helper->model(); in SetUp()
83 model->AddObserver(&mock_observer); in SetUp()
87 model->RemoveObserver(&mock_observer); in TearDown()
93 EXPECT_TRUE(model->instant_support() == INSTANT_SUPPORT_UNKNOWN); in TEST_F()
94 SearchModel::State expected_old_state = model->state(); in TEST_F()
95 SearchModel::State expected_new_state(model->state()); in TEST_F()
98 model->SetInstantSupportState(INSTANT_SUPPORT_YES); in TEST_F()
101 EXPECT_TRUE(model->instant_support() == INSTANT_SUPPORT_YES); in TEST_F()
105 model->SetInstantSupportState(INSTANT_SUPPORT_NO); in TEST_F()
[all …]

12345678910>>...74