Author Archives:

Choosing Values for Robust Tests

This article was adapted from a Google Tech on the Toilet (TotT) episode. You can download a printer-friendly version of this TotT episode and post it in your office.

By Radion Khait

A test passes. Great! But does it really mean your code is working as expected? Not necessarily.Sometimes the values you choose in your tests can create a false sense of security, especially when dealing with default values.

Consider this snippet of a simple map class and its corresponding unit test:

Implementation

Test

void MyMap::insert(int key, int value) {

  // Oops! The map entry is default-initialized, 

  // the second parameter is not used.

  internal_map_[key];

}

TEST(MyMapTest, Insert) {

  MyMap my_map;

  my_map.insert(1, 0);


  // This passes!

  EXPECT_EQ(my_map.get(1), 0); 

}

The test passes, but the insert method is broken! It never actually stores the value. The test only passes because the default value for an integer in the map (0) happens to match the value used in the test.

When choosing test values, consider the following:

  • Test with non-default values. Explicitly test with values different from the type's default (e.g., non-zero numbers, non-empty strings, enum values other than the one at index 0). This provides greater confidence that your code is actually using the provided input.

TEST(MyMapTest, Insert) {

  MyMap my_map;

  my_map.insert(1, 5);

  // This test would fail and reveal the bug in

  // the implementation above: “Expected 5, got 0”.

  EXPECT_EQ(my_map.get(1), 5);

}

  • Test multiple inputs that cover different scenarios, where it is reasonable to do so.

    • Consider empty/missing/null values, numerical boundaries, and special cases that trigger complex logic. Try to cover all distinct code/logic paths.

    • Consider using fuzzing to more thoroughly cover the input domain.

  • Use different values for each input. This guarantees the code under test doesn't accidentally reuse a single input or switch their order. Parameterized testing can also help test a large variety of inputs with minimal code duplication.

TEST(MyMapTest, Insert) {

  // Use a different value for `key` and `value`.

  my_map.insert(/*key=*/1, /*value=*/2);

  EXPECT_EQ(my_map.at(1), 2);

}




This entry was posted in Uncategorized on by .

Stable Channel Update for ChromeOS / ChromeOS Flex

M-148, ChromeOS version 16640.57.0 (Browser version 148.0.7778.250) has rolled out to ChromeOS devices on the Stable channel. 

If you find new issues, please let us know one of the following ways:

  1. File a bug

  2. Visit our ChromeOS communities

    1. General: Chromebook Help Community

    2. Beta Specific: ChromeOS Beta Help Community

  3. Report an issue or send feedback on Chrome

  4. Interested in switching channels? Find out how.


Andy Wu

Google ChromeOS


This entry was posted in Uncategorized on by .

Gmail as a source in Ask Gemini in Drive now generally available

Gmail sources in Ask Gemini in Drive is now generally available and has started rolling out to eligible Google Workspace and Google AI plans.

Ask Gemini in Drive offers a dedicated, immersive workspace designed for deep focus. Users can engage in high-context, multi-turn conversations to efficiently explore and understand content.

Previously, users could only add files and folders as sources within Ask Gemini in Drive. Now, users can unlock deeper insights by adding Gmail threads as sources in Ask Gemini for Drive. Users can ground their responses in a complete view of their business context—spanning emails, files, and folders—to ensure the most helpful and accurate answers possible.

Visit the Help Center for more information on the locations and languages where Ask Gemini in Drive is currently supported.

Getting started

Rollout pace

Availability

  • Business: Business Standard and Plus
  • Enterprise: Enterprise Standard and Plus
  • Consumer: Google AI Pro and Ultra
  • Education Add-ons: Google AI Pro for Education
  • Other Add-ons: AI Expanded Access

Resources

This entry was posted in Uncategorized on by .

Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge

Google DeepMind’s Gemma 4 12B model brings agentic, multimodal AI capabilities to everyday laptops with 16GB of RAM, enabling local data processing and visual insight generation. Users can leverage this model on macOS through the Google AI Edge Gallery for dynamic Python code execution and visualization, as well as via Google AI Edge Eloquent for completely offline voice dictation and text editing. Additionally, developer workflows are enhanced by the LiteRT-LM CLI's new serve command, which creates an industry-compatible local endpoint to power fully-local AI tools and agents.
This entry was posted in Uncategorized on by .

Gemma 4 12B: The Developer Guide

The newly released Gemma 4 12B is a dense, multimodal model designed for high-performance local AI execution on consumer devices. By introducing a novel, encoder-free architecture, it bypasses traditional visual and audio encoders to feed multimodal data directly into the LLM backbone.
This entry was posted in Uncategorized on by .

Data loss prevention policies for Google Calendar now available in GA

Data loss prevention (DLP) for Google Calendar is now generally available to protect sensitive information shared within event details. Previously available in beta, this feature allows you to create and apply data protection rules that scan calendar event titles, descriptions, and locations for sensitive content, such as credit card numbers or national identification numbers.

Key functionalities include:

  • Choice of actions: Admins can choose to audit when an event is saved with sensitive content, warn users about sensitive content in their event, or block event creation or updates if a DLP policy is violated.
  • Event details: DLP rules scan free-text fields in the event, including the event’s title, description, and location fields.
  • Owner-based policies: Rules are applied based on the organizational unit (OU) of the owner (event organizer on primary calendars or calendar owner on secondary calendars), consistent with other Workspace DLP configurations.
  • User notifications: With DLP policies for Calendar, users receive immediate feedback when sensitive data is detected. On the web, users see a pop-up notification explaining the issue. Admins can also customize this message with more specific details. If a meeting update is blocked on Android, iOS, or via the Calendar API, the user will receive an automated email notification explaining the policy violation and why changes to the meeting invite were not successful.

Getting started

  • Admins: The feature will be OFF by default and can be enabled at the organizational unit (OU) or group level. Visit the Help Center to learn more about DLP for Calendar.
  • End users: There is no end user setting for this feature.
DLP settings in the admin console to configure policies for sensitive data, including actions and alerts when creating Calendar events
An end user is prompted with a message asking them to remove sensitive information

Rollout pace

Availability

  • Enterprise: Enterprise Standard and Plus
  • Education: Education Fundamentals, Standard, and Plus
  • Other Editions: Enterprise Essentials; Frontline Standard and Plus

Resources

This entry was posted in Uncategorized on by .

New data loss prevention capabilities for file attachments and proximity conditions are generally available

Data loss prevention (DLP) rules for non-Workspace file attachments and associated proximity conditions are now generally available. These new capabilities enable organizations to target files with specific parameters, such as blocking the sharing of sensitive file formats or identifying files that contain specific strings in their titles.

Using these new content conditions, admins can set up various DLP rules for added protection, such as:

  • File names: Block files containing text string “funkyword”
  • File extensions: Block .java files
  • File types: Block custom mime type such as application/custom_app
  • Proximity matching: Detect “routing number” in proximity of 100 characters of “account number”

Additional details

In addition to file-based conditions, administrators can utilize associated proximity conditions to identify sensitive information in the file. This feature allows for the detection of sensitive data that appears within a specified distance of other predefined data types, regular expressions, or word lists.

For example, a rule can be configured to trigger when a bank account number is found within 100 characters of a routing number. By identifying data in context, proximity matching helps administrators reduce false positives and more accurately secure financial information or proprietary content.

Key functionality in DLP rules for file attachments and associated proximity conditions include:

  • Ability to match against common or custom MIME types and system file categories
  • Support for scanning attachments in Gmail, Drive, and Chat to set rules across communication channels 
  • Granular distance settings for proximity matching, allowing admins to define a range of up to 1,000 characters between matched conditions

Getting started

  • Admins: When configuring DLP rules in the admin console, admins can locate the new content conditions of file extension, file name, and file type under content conditions. Admins can also select the option of proximity matching to set a maximum distance between two pieces of matched texts. Visit the Help Center to learn more.
  • End users: There is no end user setting for this feature.
Content conditions for DLP in the Admin console to configure policies for sensitive file attachments

Rollout pace

Availability

  • Enterprise: Enterprise Standard and Plus
  • Education: Education Fundamentals, Standard, and Plus
  • Other Editions: Enterprise Essentials; Frontline Standard and Plus

Resources

This entry was posted in Uncategorized on by .