Lines Matching refs:bindings
20 // Javascript bindings for ProxyResolverV8, which returns mock values.
21 // Each time one of the bindings is called into, we push the input into a
85 // This is the same as ProxyResolverV8, but it uses mock bindings in place of
86 // the default bindings, and has a helper function to load PAC scripts from
243 MockJSBindings* bindings = resolver.mock_js_bindings();
244 EXPECT_EQ(0U, bindings->alerts.size());
245 ASSERT_EQ(1U, bindings->errors.size());
247 bindings->errors[0]);
272 MockJSBindings* bindings = resolver.mock_js_bindings();
273 EXPECT_EQ(0U, bindings->alerts.size());
276 ASSERT_EQ(1U, bindings->errors.size());
279 bindings->errors[0]);
322 MockJSBindings* bindings = resolver.mock_js_bindings();
323 EXPECT_EQ(0U, bindings->alerts.size());
324 ASSERT_EQ(1U, bindings->errors.size());
326 bindings->errors[0]);
398 MockJSBindings* bindings = resolver.mock_js_bindings();
399 bindings->dns_resolve_result = "127.0.0.1";
413 ASSERT_EQ(5U, bindings->alerts.size());
414 EXPECT_EQ("undefined", bindings->alerts[0]);
415 EXPECT_EQ("null", bindings->alerts[1]);
416 EXPECT_EQ("undefined", bindings->alerts[2]);
417 EXPECT_EQ("[object Object]", bindings->alerts[3]);
418 EXPECT_EQ("exception from calling toString()", bindings->alerts[4]);
422 ASSERT_EQ(2U, bindings->dns_resolves.size());
423 EXPECT_EQ("", bindings->dns_resolves[0]);
424 EXPECT_EQ("arg1", bindings->dns_resolves[1]);
427 EXPECT_EQ(2, bindings->my_ip_address_count);
430 EXPECT_EQ(1, bindings->my_ip_address_ex_count);
433 ASSERT_EQ(2U, bindings->dns_resolves_ex.size());
434 EXPECT_EQ("is_resolvable", bindings->dns_resolves_ex[0]);
435 EXPECT_EQ("foobar", bindings->dns_resolves_ex[1]);
446 MockJSBindings* bindings = resolver.mock_js_bindings();
449 EXPECT_EQ(1, bindings->my_ip_address_count);
459 // Check that no other bindings were called.
460 EXPECT_EQ(0U, bindings->errors.size());
461 ASSERT_EQ(0U, bindings->alerts.size());
462 ASSERT_EQ(0U, bindings->dns_resolves.size());
463 EXPECT_EQ(0, bindings->my_ip_address_ex_count);
464 ASSERT_EQ(0U, bindings->dns_resolves_ex.size());
537 // before passing it onto the bindings layer.
538 MockJSBindings* bindings = resolver.mock_js_bindings();
540 ASSERT_EQ(1u, bindings->dns_resolves.size());
541 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves[0]);
543 ASSERT_EQ(1u, bindings->dns_resolves_ex.size());
544 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves_ex[0]);